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

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

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

revision 153 by rakin, Mon Jul 29 17:28:48 2024 UTC revision 159 by rakin, Mon Jul 29 17:28:49 2024 UTC
# Line 76  export async function mute(client: Disco Line 76  export async function mute(client: Disco
76          });          });
77                    
78          await client.logger.logMute(user, reason === undefined || reason.trim() === '' ? "*No reason provided*" : reason, timeInterval, msg.member!.user as User, hard);          await client.logger.logMute(user, reason === undefined || reason.trim() === '' ? "*No reason provided*" : reason, timeInterval, msg.member!.user as User, hard);
79          await user.send({  
80              embeds: [          try {
81                  new MessageEmbed()              await user.send({
82                  .setAuthor({                  embeds: [
83                      iconURL: <string> msg.guild!.iconURL(),                      new MessageEmbed()
84                      name: `\tYou have been muted in ${msg.guild!.name}`                      .setAuthor({
85                  })                          iconURL: <string> msg.guild!.iconURL(),
86                  .addField("Reason", reason === undefined || reason.trim() === '' ? "*No reason provided*" : reason)                          name: `\tYou have been muted in ${msg.guild!.name}`
87              ]                      })
88          });                      .addField("Reason", reason === undefined || reason.trim() === '' ? "*No reason provided*" : reason)
89                    ]
90                });
91            }
92            catch (e) {
93                console.log(e);
94            }
95      }      }
96      catch (e) {      catch (e) {
97          console.log(e);          console.log(e);

Legend:
Removed from v.153  
changed lines
  Added in v.159

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26