Deprecate mute and unmute commands (#314)
- Add a deprecation message to the mute and unmute commands #252 Co-authored-by: Ethan Lane <ethan@vylpes.com> Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/314
This commit is contained in:
parent
400b4de304
commit
995564cb5b
2 changed files with 6 additions and 2 deletions
|
@ -11,7 +11,7 @@ export default class Mute extends Command {
|
||||||
|
|
||||||
super.CommandBuilder = new SlashCommandBuilder()
|
super.CommandBuilder = new SlashCommandBuilder()
|
||||||
.setName("mute")
|
.setName("mute")
|
||||||
.setDescription("Mute a member in the server with an optional reason")
|
.setDescription("(DEPRECATED) Mute a member in the server with an optional reason")
|
||||||
.setDefaultMemberPermissions(PermissionsBitField.Flags.ModerateMembers)
|
.setDefaultMemberPermissions(PermissionsBitField.Flags.ModerateMembers)
|
||||||
.addUserOption(option =>
|
.addUserOption(option =>
|
||||||
option
|
option
|
||||||
|
@ -79,5 +79,7 @@ export default class Mute extends Command {
|
||||||
|
|
||||||
const audit = new Audit(targetUser.user.id, AuditType.Mute, reason, interaction.user.id, interaction.guildId);
|
const audit = new Audit(targetUser.user.id, AuditType.Mute, reason, interaction.user.id, interaction.guildId);
|
||||||
await audit.Save(Audit, audit);
|
await audit.Save(Audit, audit);
|
||||||
|
|
||||||
|
await interaction.reply("Please note the mute and unmute commands have been deprecated and will be removed in a future update. Please use timeout instead");
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -9,7 +9,7 @@ export default class Unmute extends Command {
|
||||||
|
|
||||||
super.CommandBuilder = new SlashCommandBuilder()
|
super.CommandBuilder = new SlashCommandBuilder()
|
||||||
.setName("unmute")
|
.setName("unmute")
|
||||||
.setDescription("Unmute a member in the server with an optional reason")
|
.setDescription("(DEPRECATED) Unmute a member in the server with an optional reason")
|
||||||
.setDefaultMemberPermissions(PermissionsBitField.Flags.ModerateMembers)
|
.setDefaultMemberPermissions(PermissionsBitField.Flags.ModerateMembers)
|
||||||
.addUserOption(option =>
|
.addUserOption(option =>
|
||||||
option
|
option
|
||||||
|
@ -74,5 +74,7 @@ export default class Unmute extends Command {
|
||||||
if (channel) {
|
if (channel) {
|
||||||
await channel.send({ embeds: [ logEmbed ]});
|
await channel.send({ embeds: [ logEmbed ]});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await interaction.reply("Please note the mute and unmute commands have been deprecated and will be removed in a future update. Please use timeout instead");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue