Merge branch 'dev' into 'main'
Dev See merge request illegitimate/illegitimate-bot!204
This commit is contained in:
@@ -17,6 +17,8 @@ export = {
|
||||
option
|
||||
.setName("ign")
|
||||
.setDescription("The player's IGN.")
|
||||
.setMinLength(3)
|
||||
.setMaxLength(16)
|
||||
.setRequired(true)
|
||||
)
|
||||
.setDMPermission(false),
|
||||
|
||||
@@ -23,6 +23,8 @@ export = {
|
||||
option
|
||||
.setName("ign")
|
||||
.setDescription("The IGN of the player.")
|
||||
.setMinLength(3)
|
||||
.setMaxLength(16)
|
||||
.setRequired(true)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -16,6 +16,8 @@ export = {
|
||||
option
|
||||
.setName("ign")
|
||||
.setDescription("Player's name")
|
||||
.setMinLength(3)
|
||||
.setMaxLength(16)
|
||||
.setRequired(true)
|
||||
)
|
||||
.setDMPermission(false),
|
||||
|
||||
@@ -11,7 +11,7 @@ import { GuildData } from "interfaces"
|
||||
export = {
|
||||
name: "verify",
|
||||
description: "Verify yourself as a member of the server.",
|
||||
dev: false,
|
||||
dev: true,
|
||||
public: true,
|
||||
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -21,6 +21,8 @@ export = {
|
||||
option
|
||||
.setName("ign")
|
||||
.setDescription("Your in-game name.")
|
||||
.setMinLength(3)
|
||||
.setMaxLength(16)
|
||||
.setRequired(true)
|
||||
)
|
||||
.setDMPermission(false),
|
||||
|
||||
@@ -95,12 +95,13 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext
|
||||
}
|
||||
|
||||
for (const cmd of commandData) {
|
||||
const currentCommand = currentCommandsData.find(c => c.name === cmd.name)!
|
||||
const newCmd = commands.find(c => c.name === cmd.name)!
|
||||
const currentCommandID = currentCommands.find(c => c.name === cmd.name)!.id
|
||||
if (!currentCommandsData.find(c => c.name === cmd.name)) continue
|
||||
|
||||
if (JSON.stringify(cmd) !== JSON.stringify(currentCommand)) {
|
||||
await guildclient.commands.edit(currentCommandID, newCmd)
|
||||
const currentCommand = currentCommands.find(c => c.name === cmd.name)!
|
||||
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"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user