Merge branch 'dev' into 'main'
Dev See merge request illegitimate/illegitimate-bot!151
This commit is contained in:
@@ -306,7 +306,9 @@ export = {
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: true })!,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: true,
|
||||
})!,
|
||||
},
|
||||
fields: statsFields,
|
||||
},
|
||||
|
||||
@@ -108,7 +108,10 @@ export = {
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined,
|
||||
icon_url:
|
||||
interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
}) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -234,7 +234,9 @@ async function guildInfo(
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined,
|
||||
icon_url:
|
||||
interaction.guild!.iconURL({ forceStatic: false }) ||
|
||||
undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -204,7 +204,9 @@ async function guildMember(
|
||||
],
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false })!,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -279,8 +279,14 @@ async function guildTop(
|
||||
color: embedColor,
|
||||
fields: newList,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage + cacheStatusText,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false })!,
|
||||
text:
|
||||
interaction.guild!.name +
|
||||
" | " +
|
||||
devMessage +
|
||||
cacheStatusText,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -66,10 +66,12 @@ export = {
|
||||
fields: commandList,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: interaction.guild!.iconURL({ forceStatic: true, })!,
|
||||
url: interaction.guild!.iconURL({ forceStatic: true })!,
|
||||
},
|
||||
footer: {
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false})!,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -26,7 +26,10 @@ export = {
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild?.iconURL({ forceStatic: false }) || undefined,
|
||||
icon_url:
|
||||
interaction.guild?.iconURL({
|
||||
forceStatic: false,
|
||||
}) || undefined,
|
||||
},
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
|
||||
@@ -35,7 +35,9 @@ export = {
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url:
|
||||
interaction?.guild?.iconURL({ forceStatic: false, }) || "",
|
||||
interaction?.guild?.iconURL({
|
||||
forceStatic: false,
|
||||
}) || "",
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
@@ -70,7 +72,10 @@ export = {
|
||||
],
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined,
|
||||
icon_url:
|
||||
interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
}) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -17,7 +17,8 @@ export async function updateDiscordRoles(
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description: "You do not have permission to use this command.",
|
||||
description:
|
||||
"You do not have permission to use this command.",
|
||||
color: embedColor,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -60,7 +60,10 @@ export = {
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild?.iconURL({ forceStatic: false }) || undefined,
|
||||
icon_url:
|
||||
interaction.guild?.iconURL({
|
||||
forceStatic: false,
|
||||
}) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
65
src/commands/whoami.ts
Normal file
65
src/commands/whoami.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import { SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { Command } from "../interfaces"
|
||||
import { color, devMessage } from "../../config/options.json"
|
||||
import verify from "../schemas/verifySchema"
|
||||
import { getIGN, getHeadURL } from "../utils/Hypixel"
|
||||
|
||||
export = {
|
||||
name: "whoami",
|
||||
description: "Get your user info",
|
||||
type: "slash",
|
||||
public: true,
|
||||
dev: true,
|
||||
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("whoami")
|
||||
.setDescription("Get your user info")
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.user
|
||||
const verifyData = await verify.findOne({ userID: user.id })
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (!verifyData) {
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description: "You are not verified!",
|
||||
color: embedColor,
|
||||
},
|
||||
],
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const ign = await getIGN(verifyData.uuid)
|
||||
const head = await getHeadURL(ign!)
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
title: "User Info",
|
||||
description:
|
||||
"**User:** " +
|
||||
userMention(user.id) +
|
||||
"\n**IGN:** `" +
|
||||
ign +
|
||||
"`",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!,
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: true,
|
||||
})!,
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
},
|
||||
} as Command
|
||||
@@ -1,9 +1,9 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { AutocompleteInteraction } from "discord.js"
|
||||
|
||||
export default interface Autocomplete {
|
||||
name: string
|
||||
description: string
|
||||
type: "autocomplete"
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
execute: (interacion: AutocompleteInteraction) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { ButtonInteraction } from "discord.js"
|
||||
|
||||
export default interface Button {
|
||||
name: string
|
||||
description: string
|
||||
type: "button"
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
execute: (interaction: ButtonInteraction) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js"
|
||||
import { ExtendedClient as Client } from "../utils/Client"
|
||||
|
||||
@@ -12,6 +13,8 @@ export default interface Command {
|
||||
"addSubcommand" | "addSubcommandGroup" | "addIntegerOption"
|
||||
>
|
||||
subcommands?: boolean
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
execute: ( interaction: ChatInputCommandInteraction, client: Client,) => Promise<void>
|
||||
execute: (
|
||||
interaction: ChatInputCommandInteraction,
|
||||
client: Client,
|
||||
) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import {
|
||||
ContextMenuCommandInteraction,
|
||||
ContextMenuCommandBuilder,
|
||||
@@ -9,6 +10,5 @@ export default interface ContextMenu {
|
||||
type: "contextmenu"
|
||||
dev?: boolean
|
||||
data: ContextMenuCommandBuilder
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
execute: (interaction: ContextMenuCommandInteraction) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { ClientEvents } from "discord.js"
|
||||
|
||||
export default interface Event {
|
||||
@@ -5,6 +6,5 @@ export default interface Event {
|
||||
description: string
|
||||
type: "event"
|
||||
event: keyof ClientEvents
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
execute(...args: any[]): void
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { ModalSubmitInteraction } from "discord.js"
|
||||
|
||||
export default interface Modal {
|
||||
name: string
|
||||
description: string
|
||||
type: "modal"
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
execute: (interaction: ModalSubmitInteraction) => Promise<void>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user