Debug: Add optional userid parameter
Implemented for reset_cd to allow resetting other users cooldowns
This commit is contained in:
@@ -12,6 +12,12 @@ module.exports = {
|
|||||||
.setName("feature")
|
.setName("feature")
|
||||||
.setDescription("The command to debug")
|
.setDescription("The command to debug")
|
||||||
.setRequired(false)
|
.setRequired(false)
|
||||||
|
)
|
||||||
|
.addStringOption((option) =>
|
||||||
|
option
|
||||||
|
.setName("userid")
|
||||||
|
.setDescription("Discord ID")
|
||||||
|
.setRequired(false)
|
||||||
),
|
),
|
||||||
permissionLevel: 2,
|
permissionLevel: 2,
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
@@ -63,11 +69,12 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "reset_cd":
|
case "reset_cd":
|
||||||
await UserUtils.setCooldown(user, "pull", 1);
|
let extUser = await UserUtils.getUserByDiscordId(interaction.options.getString("userid"));
|
||||||
await UserUtils.setCooldown(user, "drop", 1);
|
await UserUtils.setCooldown(extUser, "pull", 1);
|
||||||
await UserUtils.setCooldown(user, "daily", 1);
|
await UserUtils.setCooldown(extUser, "drop", 1);
|
||||||
|
await UserUtils.setCooldown(extUser, "daily", 1);
|
||||||
interaction.reply({
|
interaction.reply({
|
||||||
content: `Reset cooldowns`,
|
content: `Reset cooldowns for <@${extUser.discordId}>`,
|
||||||
ephemeral: false
|
ephemeral: false
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user