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 |
|
|
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 |
|
|
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); |