/[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 203 by rakin, Mon Jul 29 17:29:00 2024 UTC revision 341 by rakin, Mon Jul 29 17:29:38 2024 UTC
# Line 4  import DiscordClient from '../../client/ Line 4  import DiscordClient from '../../client/
4  import CommandOptions from '../../types/CommandOptions';  import CommandOptions from '../../types/CommandOptions';
5  import InteractionOptions from '../../types/InteractionOptions';  import InteractionOptions from '../../types/InteractionOptions';
6  import MessageEmbed from '../../client/MessageEmbed';  import MessageEmbed from '../../client/MessageEmbed';
 import getUser from '../../utils/getUser';  
 import History from '../../automod/History';  
7  import getMember from '../../utils/getMember';  import getMember from '../../utils/getMember';
8  import ms from 'ms';  import ms from 'ms';
 import { unmute } from './UnmuteCommand';  
9  import PunishmentType from '../../types/PunishmentType';  import PunishmentType from '../../types/PunishmentType';
10  import { hasPermission, shouldNotModerate } from '../../utils/util';  import { hasPermission, shouldNotModerate } from '../../utils/util';
11    
# Line 57  export async function mute(client: Disco Line 54  export async function mute(client: Disco
54                  user_id: user.id,                  user_id: user.id,
55                  roles: roles.map(role => role.id),                  roles: roles.map(role => role.id),
56                  guild_id: msg.guild!.id,                  guild_id: msg.guild!.id,
57                    createdAt: new Date()
58              });              });
59          }          }
60    
# Line 72  export async function mute(client: Disco Line 70  export async function mute(client: Disco
70              reason,              reason,
71              meta: {              meta: {
72                  time: timeInterval ? ms(timeInterval) : undefined                  time: timeInterval ? ms(timeInterval) : undefined
73              }              },
74                createdAt: new Date()
75          });          });
76                    
77          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);

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26