From fa8c0b31df66d7d538acfd6f3441b486d09e14f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Thu, 21 Dec 2023 01:22:24 +0200 Subject: [PATCH] Remove Invite command --- src/client/commands.ts | 3 +-- src/client/commands/invite.ts | 32 -------------------------------- src/client/messages.ts | 1 - 3 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 src/client/commands/invite.ts diff --git a/src/client/commands.ts b/src/client/commands.ts index ef20f91..58f2794 100644 --- a/src/client/commands.ts +++ b/src/client/commands.ts @@ -1,7 +1,6 @@ import { ApplicationCommand, ApplicationCommandManager, BaseGuild, Guild, GuildApplicationCommandManager, OAuth2Guild, Snowflake } from "discord.js"; import RadioClient from "../Client"; import help from "./commands/help"; -import invite from "./commands/invite"; import list from "./commands/list"; import maintenance from "./commands/maintenance"; import next from "./commands/next"; @@ -20,7 +19,7 @@ export interface command { } export default async function commands(client: RadioClient) { - const commands1 : command[] = [ help, invite, list, maintenance, next, play, prev, statistics, status, stop ]; + const commands1 : command[] = [ help, list, maintenance, next, play, prev, statistics, status, stop ]; const commands2 = await client.application?.commands.fetch(); for(const command of commands1){ diff --git a/src/client/commands/invite.ts b/src/client/commands/invite.ts deleted file mode 100644 index a45d52c..0000000 --- a/src/client/commands/invite.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { ChatInputCommandInteraction, EmbedBuilder } from "discord.js"; -import RadioClient from "../../Client"; - -export default { - name: 'invite', - description: 'Invite Bot', - category: 'info', - execute(interaction: ChatInputCommandInteraction, client: RadioClient) { - - if(!client.user) return interaction.reply({ - content: client.messages.emojis["error"] + client.messages.maintenance, - ephemeral: true - }); - - const embed = new EmbedBuilder() - .setTitle(client.messages.replace(client.messages.inviteTitle, { - "%client.user.username%": client.user.username - })) - .setColor(client.config.embedColor) - .setURL("https://discord.com/api/oauth2/authorize?client_id=" + client.user.id + "&permissions=2184465408&scope=applications.commands%20bot") //View Channels, Send Messages, Embed Links, Use External Emojis, Use Slash Commands, Connect, Speak, Use Voice Activity - .setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png') - .setFooter({ - text: client.messages.footerText, - iconURL: "https://cdn.discordapp.com/emojis/" + client.messages.emojis["eximiabots"].replace(/[^0-9]+/g, '') - }); - - interaction.reply({ - embeds: [embed], - ephemeral: true - }); - } -}; diff --git a/src/client/messages.ts b/src/client/messages.ts index 638e004..f8d83c6 100644 --- a/src/client/messages.ts +++ b/src/client/messages.ts @@ -18,7 +18,6 @@ export const messages = { noPermsEmbed: "I cannot send embeds (Embed links).", helpTitle: "Help", helpDescription: "Join to our support server" + "\n" + "%client.config.supportGuild%", - inviteTitle: "Invite %client.user.username% to your Discord server!", listTitle: "Radio Stations", playTitle1: ":radio: Channel", playDescription1: "__%radio.station.name%__" + "\n" + "%radio.station.owner%",