log guildId in pushCommands script
This commit is contained in:
parent
312f22827e
commit
48b9ec02a0
1 changed files with 4 additions and 3 deletions
|
@ -22,13 +22,14 @@ const rest = new REST().setToken(config.tokens.Discord);
|
|||
|
||||
(async () => {
|
||||
const me = await rest.get(Routes.oauth2CurrentApplication()) as RESTGetAPIOAuth2CurrentApplicationResult;
|
||||
console.log(`Started refreshing ${post.length} application commands.`);
|
||||
if (guildId && guildId != "")
|
||||
if (guildId && guildId != "") {
|
||||
console.log(`Started refreshing ${post.length} application guild (${guildId}) commands.`);
|
||||
await rest.put(
|
||||
Routes.applicationGuildCommands(me.id, guildId),
|
||||
{ body: post },
|
||||
);
|
||||
else {
|
||||
} else {
|
||||
console.log(`Started refreshing ${post.length} application global commands.`);
|
||||
await rest.put(
|
||||
Routes.applicationCommands(me.id),
|
||||
{ body: post },
|
||||
|
|
Loading…
Reference in a new issue