Updated autodeploy script
This commit is contained in:
@@ -95,12 +95,13 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const cmd of commandData) {
|
for (const cmd of commandData) {
|
||||||
const currentCommand = currentCommandsData.find(c => c.name === cmd.name)!
|
if (!currentCommandsData.find(c => c.name === cmd.name)) continue
|
||||||
const newCmd = commands.find(c => c.name === cmd.name)!
|
|
||||||
const currentCommandID = currentCommands.find(c => c.name === cmd.name)!.id
|
|
||||||
|
|
||||||
if (JSON.stringify(cmd) !== JSON.stringify(currentCommand)) {
|
const currentCommand = currentCommands.find(c => c.name === cmd.name)!
|
||||||
await guildclient.commands.edit(currentCommandID, newCmd)
|
const currentCommandData = currentCommandsData.find(c => c.name === cmd.name)!
|
||||||
|
|
||||||
|
if (JSON.stringify(cmd) !== JSON.stringify(currentCommandData)) {
|
||||||
|
await guildclient.commands.edit(currentCommand.id, cmd)
|
||||||
console.log(color(" " + cmd.name + " was updated.", "lavender"))
|
console.log(color(" " + cmd.name + " was updated.", "lavender"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user