Merge branch 'dev' into 'main'
Dev See merge request illegitimate/illegitimate-bot!160
This commit is contained in:
@@ -118,7 +118,7 @@ export = {
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
const linkedDiscord = player.socialMedia.links.DISCORD || null
|
const linkedDiscord = player?.socialMedia?.links?.DISCORD || null
|
||||||
if (!linkedDiscord) {
|
if (!linkedDiscord) {
|
||||||
interaction.editReply({
|
interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export interface PlayerData {
|
|||||||
userLanguage: string
|
userLanguage: string
|
||||||
easter2020Cooldowns2: Easter2020Cooldowns2
|
easter2020Cooldowns2: Easter2020Cooldowns2
|
||||||
rankPlusColor: string
|
rankPlusColor: string
|
||||||
socialMedia: SocialMedia
|
socialMedia?: SocialMedia
|
||||||
achievementTotem: AchievementTotem
|
achievementTotem: AchievementTotem
|
||||||
claimed_potato_talisman: number
|
claimed_potato_talisman: number
|
||||||
summer2020Cooldowns: Summer2020Cooldowns
|
summer2020Cooldowns: Summer2020Cooldowns
|
||||||
@@ -11346,11 +11346,11 @@ export interface Easter2020Cooldowns2 {
|
|||||||
export interface SocialMedia {
|
export interface SocialMedia {
|
||||||
prompt: boolean
|
prompt: boolean
|
||||||
TWITCH: string
|
TWITCH: string
|
||||||
links: Links
|
links?: Links
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Links {
|
export interface Links {
|
||||||
DISCORD: string
|
DISCORD?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AchievementTotem {
|
export interface AchievementTotem {
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
export type Profile = {
|
|
||||||
data: {
|
|
||||||
id: string
|
|
||||||
name: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Profile2 = {
|
|
||||||
data: {
|
|
||||||
id: string
|
|
||||||
name: string
|
|
||||||
properties: { name: string; value: string }[]
|
|
||||||
profileActions: []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export type FileType = "js" | "ts"
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
import { Profile, Profile2, FileType } from "./Types"
|
|
||||||
|
|
||||||
export { Profile, Profile2, FileType }
|
|
||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Routes,
|
Routes,
|
||||||
} from "discord.js"
|
} from "discord.js"
|
||||||
import fs = require("fs")
|
import fs = require("fs")
|
||||||
import { FileType } from "../typings"
|
type FileType = "js" | "ts"
|
||||||
|
|
||||||
async function autoDeployCommands(fileType: FileType) {
|
async function autoDeployCommands(fileType: FileType) {
|
||||||
const commands = []
|
const commands = []
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { loadContextMenuEvents } from "./eventHandlers"
|
|||||||
import { loadModalEvents } from "./eventHandlers"
|
import { loadModalEvents } from "./eventHandlers"
|
||||||
import { loadEvents } from "./eventHandlers"
|
import { loadEvents } from "./eventHandlers"
|
||||||
import { loadAutocompleteEvents } from "./eventHandlers"
|
import { loadAutocompleteEvents } from "./eventHandlers"
|
||||||
import { FileType } from "../typings"
|
type FileType = "js" | "ts"
|
||||||
|
|
||||||
export function loadAllEvents(client: Client, ft: FileType) {
|
export function loadAllEvents(client: Client, ft: FileType) {
|
||||||
loadEvents(client)
|
loadEvents(client)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Autocomplete } from "../../interfaces"
|
|||||||
import { Events, GuildTextBasedChannel } from "discord.js"
|
import { Events, GuildTextBasedChannel } from "discord.js"
|
||||||
import path = require("path")
|
import path = require("path")
|
||||||
import fs = require("fs")
|
import fs = require("fs")
|
||||||
import { FileType } from "../../typings"
|
type FileType = "js" | "ts"
|
||||||
const embedColor = Number(color.replace("#", "0x"))
|
const embedColor = Number(color.replace("#", "0x"))
|
||||||
|
|
||||||
export default function loadAutocompleteEvents(client: Client, ft: FileType) {
|
export default function loadAutocompleteEvents(client: Client, ft: FileType) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Button } from "../../interfaces"
|
|||||||
import { Events, GuildTextBasedChannel } from "discord.js"
|
import { Events, GuildTextBasedChannel } from "discord.js"
|
||||||
import path = require("path")
|
import path = require("path")
|
||||||
import fs = require("fs")
|
import fs = require("fs")
|
||||||
import { FileType } from "../../typings"
|
type FileType = "js" | "ts"
|
||||||
const embedColor = Number(color.replace("#", "0x"))
|
const embedColor = Number(color.replace("#", "0x"))
|
||||||
|
|
||||||
export default function loadButtonEvents(client: Client, ft: FileType) {
|
export default function loadButtonEvents(client: Client, ft: FileType) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Command } from "../../interfaces"
|
|||||||
import { Events, GuildTextBasedChannel } from "discord.js"
|
import { Events, GuildTextBasedChannel } from "discord.js"
|
||||||
import path = require("path")
|
import path = require("path")
|
||||||
import fs = require("fs")
|
import fs = require("fs")
|
||||||
import { FileType } from "../../typings"
|
type FileType = "js" | "ts"
|
||||||
const embedColor = Number(color.replace("#", "0x"))
|
const embedColor = Number(color.replace("#", "0x"))
|
||||||
|
|
||||||
export default function loadSlashCommandsEvents(client: Client, ft: FileType) {
|
export default function loadSlashCommandsEvents(client: Client, ft: FileType) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { errorLogChannel, color } from "../../../config/options.json"
|
|||||||
import { Events, GuildTextBasedChannel } from "discord.js"
|
import { Events, GuildTextBasedChannel } from "discord.js"
|
||||||
import path = require("path")
|
import path = require("path")
|
||||||
import fs = require("fs")
|
import fs = require("fs")
|
||||||
import { FileType } from "../../typings"
|
type FileType = "js" | "ts"
|
||||||
const embedColor = Number(color.replace("#", "0x"))
|
const embedColor = Number(color.replace("#", "0x"))
|
||||||
|
|
||||||
export default function loadContextMenuEvents(client: Client, ft: FileType) {
|
export default function loadContextMenuEvents(client: Client, ft: FileType) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Modal } from "../../interfaces"
|
|||||||
import { Events, GuildTextBasedChannel } from "discord.js"
|
import { Events, GuildTextBasedChannel } from "discord.js"
|
||||||
import path = require("path")
|
import path = require("path")
|
||||||
import fs = require("fs")
|
import fs = require("fs")
|
||||||
import { FileType } from "../../typings"
|
type FileType = "js" | "ts"
|
||||||
const embedColor = Number(color.replace("#", "0x"))
|
const embedColor = Number(color.replace("#", "0x"))
|
||||||
|
|
||||||
export default function loadModalEvents(client: Client, ft: FileType) {
|
export default function loadModalEvents(client: Client, ft: FileType) {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import fetch from "axios"
|
import fetch from "axios"
|
||||||
import env from "../Env"
|
import env from "../Env"
|
||||||
import { Profile, Profile2 } from "../../typings"
|
|
||||||
import { Player, PlayerData } from "../../interfaces"
|
import { Player, PlayerData } from "../../interfaces"
|
||||||
import { Guild, GuildData } from "../../interfaces"
|
import { Guild, GuildData } from "../../interfaces"
|
||||||
const apikey = env.prod.hypixelapikey
|
const apikey = env.prod.hypixelapikey
|
||||||
@@ -11,6 +10,22 @@ const guild = "https://api.hypixel.net/guild"
|
|||||||
const minotar = "https://minotar.net/helm/"
|
const minotar = "https://minotar.net/helm/"
|
||||||
type GuildQuerqType = "player" | "name" | "id"
|
type GuildQuerqType = "player" | "name" | "id"
|
||||||
|
|
||||||
|
type Profile = {
|
||||||
|
data: {
|
||||||
|
id: string
|
||||||
|
name: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
type Profile2 = {
|
||||||
|
data: {
|
||||||
|
id: string
|
||||||
|
name: string
|
||||||
|
properties: { name: string; value: string }[]
|
||||||
|
profileActions: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function getUUID(ign: string): Promise<string | null> {
|
async function getUUID(ign: string): Promise<string | null> {
|
||||||
try {
|
try {
|
||||||
const req: Profile = await fetch(mojang + ign)
|
const req: Profile = await fetch(mojang + ign)
|
||||||
|
|||||||
Reference in New Issue
Block a user