/[sudobot]/trunk/src/commands/moderation/UnmuteCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/moderation/UnmuteCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 124 by rakin, Mon Jul 29 17:28:41 2024 UTC revision 203 by rakin, Mon Jul 29 17:29:00 2024 UTC
# Line 1  Line 1 
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';
# Line 78  export async function unmute(client: Dis Line 78  export async function unmute(client: Dis
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      }      }
# Line 97  export async function unmute(client: Dis Line 102  export async function unmute(client: Dis
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', []);
# Line 179  export default class UnmuteCommand exten Line 185  export default class UnmuteCommand exten
185              ]              ]
186          });          });
187      }      }
 }  
188    }

Legend:
Removed from v.124  
changed lines
  Added in v.203

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26