refactor(all): uniformisation

This commit is contained in:
BlackAngelTV committed 2026-09-23 18:25:28 +02:00
1 parent ee538cb943
commit 50665c8edd
89 files changed
+10215 -10215

No files matched your search

+13 -13
View File
@@ -1,13 +1,13 @@
import { REST, Routes } from 'discord.js';
import { assertRequiredEnv, env } from '../src/config/env.js';
import { loadCommands } from '../src/core/command-loader.js';
assertRequiredEnv(['DISCORD_TOKEN', 'DISCORD_CLIENT_ID', 'DISCORD_GUILD_ID']);
const body = (await loadCommands()).map((command) => command.data.toJSON());
const rest = new REST().setToken(env.discord.token);
// Guild commands update instantly, which suits a single-server bot (M2-T05).
await rest.put(Routes.applicationGuildCommands(env.discord.clientId, env.discord.guildId), { body });
console.log(`Registered ${body.length} slash commands on guild ${env.discord.guildId}.`);
import { REST, Routes } from 'discord.js';
import { assertRequiredEnv, env } from '../src/config/env.js';
import { loadCommands } from '../src/core/command-loader.js';
assertRequiredEnv(['DISCORD_TOKEN', 'DISCORD_CLIENT_ID', 'DISCORD_GUILD_ID']);
const body = (await loadCommands()).map((command) => command.data.toJSON());
const rest = new REST().setToken(env.discord.token);
// Guild commands update instantly, which suits a single-server bot (M2-T05).
await rest.put(Routes.applicationGuildCommands(env.discord.clientId, env.discord.guildId), { body });
console.log(`Registered ${body.length} slash commands on guild ${env.discord.guildId}.`);