merge scripts

This commit is contained in:
Ryan Cao 2022-08-24 20:11:22 +08:00
parent 01ce9ad000
commit 6785418c3c
No known key found for this signature in database
GPG key ID: 528A2C1B6656B97F
3 changed files with 7 additions and 11 deletions

View file

@ -1,11 +0,0 @@
import { REST } from '@discordjs/rest';
import { Routes } from 'discord.js';
import 'dotenv/config';
const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN!);
rest
.put(Routes.applicationCommands('977174139297230888'), { body: [] })
.then(() => console.log('Successfully deleted all application commands.'))
.catch(console.error);

View file

@ -34,6 +34,12 @@ import 'dotenv/config';
const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN!);
await rest.put(Routes.applicationCommands('977174139297230888'), {
body: [],
});
console.log('Successfully deleted all application commands.');
await rest.put(Routes.applicationCommands('977174139297230888'), {
body: commands,
});