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

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

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

revision 186 by rakin, Mon Jul 29 17:28:56 2024 UTC revision 194 by rakin, Mon Jul 29 17:28:58 2024 UTC
# Line 11  import PunishmentType from '../../types/ Line 11  import PunishmentType from '../../types/
11  import { fetchEmojiStr } from '../../utils/Emoji';  import { fetchEmojiStr } from '../../utils/Emoji';
12  import ms from 'ms';  import ms from 'ms';
13  import { clearTimeoutv2, getTimeouts, setTimeoutv2 } from '../../utils/setTimeout';  import { clearTimeoutv2, getTimeouts, setTimeoutv2 } from '../../utils/setTimeout';
14  import { shouldNotModerate } from '../../utils/util';  import { hasPermission, shouldNotModerate } from '../../utils/util';
15    
16  export default class tempBanCommand extends BaseCommand {  export default class TempBanCommand extends BaseCommand {
17      supportsInteractions: boolean = true;      supportsInteractions: boolean = true;
18    
19      constructor() {      constructor() {
# Line 136  export default class tempBanCommand exte Line 136  export default class tempBanCommand exte
136              try {              try {
137                  const member = await msg.guild?.members.fetch(user.id);                  const member = await msg.guild?.members.fetch(user.id);
138    
139                    if (member && !(await hasPermission(client, member, msg, null, "You don't have permission to tempban this user."))) {
140                        return;
141                    }
142    
143                  if (member && shouldNotModerate(client, member)) {                  if (member && shouldNotModerate(client, member)) {
144                      await msg.reply({                      await msg.reply({
145                          embeds: [                          embeds: [

Legend:
Removed from v.186  
changed lines
  Added in v.194

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26