fix
This commit is contained in:
parent
3d36346a4e
commit
ec68b87738
@ -16,14 +16,16 @@ export default function updateCommands(config: ConfigManager) {
|
|||||||
const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN);
|
const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN);
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
|
||||||
console.log(`Started refreshing ${commands.length} application (/) commands.`);
|
console.log(`Started refreshing ${commands.length} application (/) commands.`);
|
||||||
|
|
||||||
|
try {
|
||||||
await rest.put(
|
await rest.put(
|
||||||
Routes.applicationCommands(String(process.env.CLIENT_ID)),
|
Routes.applicationCommands(String(process.env.CLIENT_ID)),
|
||||||
{ body: [] },
|
{ body: [] },
|
||||||
);
|
);
|
||||||
|
} catch (e) { }
|
||||||
|
|
||||||
|
try {
|
||||||
const data: any = await rest.put(
|
const data: any = await rest.put(
|
||||||
Routes.applicationGuildCommands(String(process.env.CLIENT_ID), String(process.env.GUILD_ID)),
|
Routes.applicationGuildCommands(String(process.env.CLIENT_ID), String(process.env.GUILD_ID)),
|
||||||
{ body: commands },
|
{ body: commands },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user