1 |
import { BanOptions, CommandInteraction, Guild, GuildMember, Interaction, Message, User } from 'discord.js'; |
import { BanOptions, CommandInteraction, Guild, GuildMember, Interaction, Message, Permissions, User } from 'discord.js'; |
2 |
import BaseCommand from '../../utils/structures/BaseCommand'; |
import BaseCommand from '../../utils/structures/BaseCommand'; |
3 |
import DiscordClient from '../../client/Client'; |
import DiscordClient from '../../client/Client'; |
4 |
import CommandOptions from '../../types/CommandOptions'; |
import CommandOptions from '../../types/CommandOptions'; |
78 |
mod_tag: d.tag, |
mod_tag: d.tag, |
79 |
}); |
}); |
80 |
|
|
81 |
await user.send({ |
try { |
82 |
embeds: [ |
await user.send({ |
83 |
new MessageEmbed() |
embeds: [ |
84 |
.setAuthor({ |
new MessageEmbed() |
85 |
iconURL: <string> user.guild!.iconURL(), |
.setAuthor({ |
86 |
name: `\tYou have been unmuted in ${user.guild!.name}` |
iconURL: <string> user.guild!.iconURL(), |
87 |
}) |
name: `\tYou have been unmuted in ${user.guild!.name}` |
88 |
] |
}) |
89 |
}); |
] |
90 |
|
}); |
91 |
|
} |
92 |
|
catch (e) { |
93 |
|
console.log(e); |
94 |
|
} |
95 |
|
|
96 |
await client.logger.logUnmute(user, d); |
await client.logger.logUnmute(user, d); |
97 |
} |
} |
102 |
|
|
103 |
export default class UnmuteCommand extends BaseCommand { |
export default class UnmuteCommand extends BaseCommand { |
104 |
supportsInteractions: boolean = true; |
supportsInteractions: boolean = true; |
105 |
|
permissions = [Permissions.FLAGS.MODERATE_MEMBERS]; |
106 |
|
|
107 |
constructor() { |
constructor() { |
108 |
super('unmute', 'moderation', []); |
super('unmute', 'moderation', []); |
185 |
] |
] |
186 |
}); |
}); |
187 |
} |
} |
|
} |
|
188 |
|
} |