diff --git a/src/request-bot.js b/src/request-bot.js index b3d58a0..861163d 100644 --- a/src/request-bot.js +++ b/src/request-bot.js @@ -7,9 +7,6 @@ import { } from "discord.js"; import crypto from "crypto"; -const GUILD_ID = "1449756600733798501"; -const REQUEST_CHANNEL_ID = "1449767378882920568"; - const client = new Client({ intents: [GatewayIntentBits.Guilds], }); @@ -46,7 +43,7 @@ const rest = new REST({ version: "10" }).setToken(process.env.DISCORD_TOKEN); await rest.put( Routes.applicationGuildCommands( (await rest.get(Routes.oauth2CurrentApplication())).id, - GUILD_ID + process.env.GUILD_ID ), { body: [command.toJSON()] } ); @@ -123,7 +120,7 @@ client.on("interactionCreate", async interaction => { if (!interaction.isChatInputCommand()) return; if (interaction.commandName !== "request") return; - if (interaction.guildId !== GUILD_ID) { + if (interaction.guildId !== process.env.GUILD_ID) { return interaction.reply({ content: "❌ This command can only be used in the main server.", flags: { @@ -170,7 +167,7 @@ client.on("interactionCreate", async interaction => { }); } - const channel = await client.channels.fetch(REQUEST_CHANNEL_ID); + const channel = await client.channels.fetch(process.env.REQUEST_CHANNEL_ID); await channel.send({ embeds: [ @@ -207,7 +204,7 @@ client.on("interactionCreate", async interaction => { }); } - const channel = await client.channels.fetch(REQUEST_CHANNEL_ID); + const channel = await client.channels.fetch(process.env.REQUEST_CHANNEL_ID); await channel.send({ embeds: [