bug fixes

This commit is contained in:
Yusur 2025-01-17 10:55:17 +01:00
parent 6b88aff1e7
commit 4b8fa012da
3 changed files with 11 additions and 3 deletions

View file

@ -16,9 +16,11 @@ limitations under the License.
import { SlashCommandOptionsOnlyBuilder } from 'discord.js';
import yroo from './commands/yroo';
import wiki from './commands/wiki';
const commandList = [
yroo
yroo,
wiki
];
export default commandList;

View file

@ -47,4 +47,6 @@ async function execute (interaction: ChatInputCommandInteraction) {
await interaction.followUp({
embeds: [pageEmbed]
});
}
}
export default { data, execute };

View file

@ -26,7 +26,11 @@ for (let command of commandList) {
commands.push(command.data.toJSON());
}
const guilds = process.env.GUILD_IDS.trim().split(/[\s,;]+/);
if (process.env.GUILD_IDS === void 0){
console.warn('GUILD_IDS not set, registering commands globally');
}
const guilds = (process.env.GUILD_IDS ?? '').trim().split(/[\s,;]+/);
const rest = new REST({ version: '10' }).setToken(process.env.TOKEN);