Skip to content

Commit 3b2f86a

Browse files
committed
Removed all DEVELOPMENT_GUILD_ID environment variable code
1 parent 64aa6c5 commit 3b2f86a

1 file changed

Lines changed: 7 additions & 33 deletions

File tree

source/bot.js

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ export default async () => {
5151
client.on(Events.InteractionCreate, async (interaction) => {
5252
if (!interaction.isCommand()) return;
5353

54-
// ignore non-dev commands in dev guild
55-
if (process.env.DEVELOPMENT_GUILD_ID)
56-
if (interaction.guild.id !== process.env.DEVELOPMENT_GUILD_ID) return;
57-
5854
try {
5955
// defer reply to give the bot time to process
6056
await interaction.deferReply();
@@ -84,35 +80,13 @@ export default async () => {
8480
commands.push(data);
8581
}
8682

87-
if (process.env.DEVELOPMENT_GUILD_ID) {
88-
console.log(
89-
"Development guild ID set, registering slash commands there instead."
90-
);
91-
92-
await client.rest.put(
93-
Routes.applicationGuildCommands(
94-
client.application.id,
95-
process.env.DEVELOPMENT_GUILD_ID
96-
),
97-
{
98-
body: commands,
99-
}
100-
);
101-
102-
console.log(
103-
`Slash commands registered in development guild: ${commands.map(
104-
(c) => c.name
105-
)}`
106-
);
107-
} else {
108-
await client.rest.put(Routes.applicationCommands(client.application.id), {
109-
body: commands,
110-
});
111-
112-
console.log(
113-
`Global slash commands registered: ${commands.map((c) => c.name)}`
114-
);
115-
}
83+
await client.rest.put(Routes.applicationCommands(client.application.id), {
84+
body: commands,
85+
});
86+
87+
console.log(
88+
`Global slash commands registered: ${commands.map((c) => c.name)}`
89+
);
11690
}
11791
};
11892

0 commit comments

Comments
 (0)