Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commands.on(
- { name: 'mute', filters: discord.command.filters.canMuteMembers() },
- (args) => ({
- member: args.guildMember(),
- dur: args.textOptional()
- }),
- async (message, { member, dur }) => {
- await message.delete();
- if (message.author.id === member.user.id) return;
- await member.addRole('Mute Role ID here');
- // if a reason was provided, broadcast it
- if (dur !== null) {
- await message.reply({
- embed: new discord.Embed().setDescription(
- `🔇 **Mute** \n\n**Offender:** ${member.toMention()} \n**Duration:** ${dur} \n**Responsible Moderator:** <@270148059269300224>`
- )
- });
- }
- }
- );
- commands.on(
- { name: 'unmute', filters: discord.command.filters.canMuteMembers() },
- (args) => ({
- member: args.guildMember()
- }),
- async (message, { member }) => {
- await message.delete();
- if (message.author.id === member.user.id) return;
- await member.removeRole('Mute ID role here');
- // if a reason was provided, broadcast it
- await message.reply({
- embed: new discord.Embed().setDescription(
- `🔊 **unmute** \n\n**Offender:** ${member.toMention()} \n**Reason:** Automatic unmute made by <@270148059269300224>`
- )
- });
- }
- );
- commands.raw('role', async (message) => {
- // Get the author of the message
- const user = message.author;
- // Fetch the guild this message was sent in
- const guild = await message.getGuild();
- // Get the channel the message was sent in, note the 'await' keyword
- const channel = await message.getChannel();
- // Fetch role data from the guild for all the roles the user has assigned
- const roles = await Promise.all(
- message.member.roles.map((716758432622968926) => guild.getRole(716758432622968926))
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement