mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-26 04:31:03 +00:00
- Migrated to a new command framework which looks better and works better - Fixed commands not being bundled correctly - Added message (prefix) commands with argument validation - Added a new CommandErrorType, for invalid arguments - `/eval` is now a bit safer - Corrected colors for the coinflip embed - `/stop` now works even when the bot is not connected to the API
25 lines
854 B
TypeScript
25 lines
854 B
TypeScript
import { ModerationCommand } from '$/classes/Command'
|
|
import { createSuccessEmbed } from '$/utils/discord/embeds'
|
|
import { cureNickname } from '$/utils/discord/moderation'
|
|
|
|
export default new ModerationCommand({
|
|
name: 'cure',
|
|
description: "Cure a member's nickname",
|
|
options: {
|
|
member: {
|
|
description: 'The member to cure',
|
|
required: true,
|
|
type: ModerationCommand.OptionType.User,
|
|
},
|
|
},
|
|
async execute(_, interaction, { member: user }) {
|
|
const guild = await interaction.client.guilds.fetch(interaction.guildId)
|
|
const member = await guild.members.fetch(user)
|
|
await cureNickname(member)
|
|
await interaction.reply({
|
|
embeds: [createSuccessEmbed(null, `Cured nickname for ${member.toString()}`)],
|
|
ephemeral: true,
|
|
})
|
|
},
|
|
})
|