🩹 dev guild commands now working as expected

This commit is contained in:
Axel Olausson Holtenäs 2022-10-22 15:59:36 +02:00
parent 1b4c776037
commit 74c94b467f
No known key found for this signature in database
GPG key ID: BEDBB4D61E6C8462

View file

@ -26,15 +26,13 @@ export default async (client: Client) => {
throw new Error(`Could not gather command list: ${error}`);
});
await client.application?.commands
.set(commandList, process.env.DISCORD_GUILD_ID)
.then(() => {
await client.application?.commands.set(commandList).then(() => {
logger.info(`Finished updating command list.`);
});
if (process.env.NODE_ENV !== "production") {
await client.application?.commands
.set(commandList)
.set(commandList, process.env.DISCORD_GUILD_ID)
.then(() => logger.info(`Finished updating guild command list.`));
}
};