Merge branch 'dev' into 'main'
Dev See merge request illegitimate/illegitimate-bot!204
This commit is contained in:
@@ -17,6 +17,8 @@ export = {
|
|||||||
option
|
option
|
||||||
.setName("ign")
|
.setName("ign")
|
||||||
.setDescription("The player's IGN.")
|
.setDescription("The player's IGN.")
|
||||||
|
.setMinLength(3)
|
||||||
|
.setMaxLength(16)
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ export = {
|
|||||||
option
|
option
|
||||||
.setName("ign")
|
.setName("ign")
|
||||||
.setDescription("The IGN of the player.")
|
.setDescription("The IGN of the player.")
|
||||||
|
.setMinLength(3)
|
||||||
|
.setMaxLength(16)
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ export = {
|
|||||||
option
|
option
|
||||||
.setName("ign")
|
.setName("ign")
|
||||||
.setDescription("Player's name")
|
.setDescription("Player's name")
|
||||||
|
.setMinLength(3)
|
||||||
|
.setMaxLength(16)
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { GuildData } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "verify",
|
name: "verify",
|
||||||
description: "Verify yourself as a member of the server.",
|
description: "Verify yourself as a member of the server.",
|
||||||
dev: false,
|
dev: true,
|
||||||
public: true,
|
public: true,
|
||||||
|
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
@@ -21,6 +21,8 @@ export = {
|
|||||||
option
|
option
|
||||||
.setName("ign")
|
.setName("ign")
|
||||||
.setDescription("Your in-game name.")
|
.setDescription("Your in-game name.")
|
||||||
|
.setMinLength(3)
|
||||||
|
.setMaxLength(16)
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|||||||
@@ -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