Initial commit
This commit is contained in:
26
dist/deploy-commands.js
vendored
Normal file
26
dist/deploy-commands.js
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import { REST, Routes } from 'discord.js';
|
||||
import { env } from './config/env.js';
|
||||
import * as setup from './commands/setup.js';
|
||||
import * as leaderboard from './commands/leaderboard.js';
|
||||
import * as profile from './commands/profile.js';
|
||||
import * as resetmemory from './commands/resetmemory.js';
|
||||
import { banData, kickData, timeoutData } from './commands/moderation.js';
|
||||
async function main() {
|
||||
const commands = [
|
||||
setup.data.toJSON(),
|
||||
leaderboard.data.toJSON(),
|
||||
profile.data.toJSON(),
|
||||
resetmemory.data.toJSON(),
|
||||
banData.toJSON(),
|
||||
kickData.toJSON(),
|
||||
timeoutData.toJSON()
|
||||
];
|
||||
const rest = new REST({ version: '10' }).setToken(env.discordToken);
|
||||
await rest.put(Routes.applicationCommands(env.discordClientId), { body: commands });
|
||||
// You can replace with Routes.applicationGuildCommands for quicker iteration per guild
|
||||
console.log('Commands deployed.');
|
||||
}
|
||||
main().catch((e) => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user