mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Turn on strict TS compilation. Fix up and tweak types accordingly.
This commit is contained in:
parent
690955a399
commit
629002b8d9
172 changed files with 720 additions and 534 deletions
|
@ -15,7 +15,7 @@ export async function actualUnmuteCmd(
|
|||
) {
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.author;
|
||||
let pp = null;
|
||||
let pp: User | null = null;
|
||||
|
||||
if (args.mod) {
|
||||
if (!hasPermission(pluginData, "can_act_as_other", { message: msg, channelId: msg.channel.id })) {
|
||||
|
@ -27,15 +27,20 @@ export async function actualUnmuteCmd(
|
|||
pp = msg.author;
|
||||
}
|
||||
|
||||
const reason = formatReasonWithAttachments(args.reason, msg.attachments);
|
||||
const reason = args.reason ? formatReasonWithAttachments(args.reason, msg.attachments) : undefined;
|
||||
|
||||
const mutesPlugin = pluginData.getPlugin(MutesPlugin);
|
||||
const result = await mutesPlugin.unmuteUser(user.id, args.time, {
|
||||
modId: mod.id,
|
||||
ppId: pp && pp.id,
|
||||
ppId: pp ? pp.id : undefined,
|
||||
reason,
|
||||
});
|
||||
|
||||
if (!result) {
|
||||
sendErrorMessage(pluginData, msg.channel, "User is not muted!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Confirm the action to the moderator
|
||||
if (args.time) {
|
||||
const timeUntilUnmute = args.time && humanizeDuration(args.time);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue