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