Redo some stuff in updateGuild script
This commit is contained in:
parent
0693713bbe
commit
c04b6ffc11
|
@ -4,10 +4,11 @@
|
|||
**/persist
|
||||
|
||||
# Files
|
||||
**/.env
|
||||
**/.prettierrc
|
||||
**/LICENSE
|
||||
**/package-lock.json
|
||||
**/package.json
|
||||
**/README.md
|
||||
**/tsconfig.json
|
||||
.env
|
||||
.prettierrc
|
||||
LICENSE
|
||||
package-lock.json
|
||||
package.json
|
||||
README.md
|
||||
tsconfig.json
|
||||
pnpm-lock.yaml
|
||||
|
|
|
@ -26,10 +26,10 @@ if (process.argv.length < 3 || !process.argv[2]) {
|
|||
|
||||
BotClient.on(Events.ClientReady, () => {
|
||||
try {
|
||||
BotClient.guilds.fetch(process.argv[2])
|
||||
.then(guild => {
|
||||
deployCommands({ guildId: guild.id });
|
||||
console.log(`Updated (/) commands for "${guild.name}".`);
|
||||
BotClient.fetchGuildPreview(process.argv[2])
|
||||
.then(({ id, name }) => {
|
||||
deployCommands({ guildId: id });
|
||||
console.log(`Updated (/) commands for "${name}".`);
|
||||
process.exit(0);
|
||||
})
|
||||
.catch(err => {
|
||||
|
@ -40,4 +40,4 @@ BotClient.on(Events.ClientReady, () => {
|
|||
console.log("An error occurred refreshing (/) commands:", err);
|
||||
process.exit(1);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue