reorganize

This commit is contained in:
Ryan Cao 2022-08-29 12:02:16 +08:00
parent 0aaee0e0f1
commit d16bec1336
No known key found for this signature in database
GPG key ID: 528A2C1B6656B97F
6 changed files with 67 additions and 48 deletions

View file

@ -36,16 +36,19 @@ import 'dotenv/config';
.addStringOption((option) =>
option.setName('id').setDescription('The ID or slug').setRequired(true)
),
new SlashCommandBuilder()
.setName('say')
.setDescription('Say someothing through the bot')
.addStringOption((option) =>
option
.setName('content')
.setDescription('Just content?')
.setRequired(true)
),
].map((command) => command.toJSON());
const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN!);
await rest.put(Routes.applicationCommands(process.env.DISCORD_APP!), {
body: [],
});
console.log('Successfully deleted all application commands.');
await rest.put(Routes.applicationCommands(process.env.DISCORD_APP!), {
body: commands,
});