mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Add proper types to sendSuccessMessage()
This commit is contained in:
parent
1a5fe949af
commit
6896afebfa
3 changed files with 20 additions and 7 deletions
|
@ -148,7 +148,7 @@ export const UtilityPlugin = zeppelinGuildPlugin<UtilityPluginType>()("utility",
|
|||
state.lastReload = Date.now();
|
||||
|
||||
if (activeReloads.has(guild.id)) {
|
||||
sendSuccessMessage(pluginData, activeReloads.get(guild.id), "Reloaded!");
|
||||
sendSuccessMessage(pluginData, activeReloads.get(guild.id)!, "Reloaded!");
|
||||
activeReloads.delete(guild.id);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -136,7 +136,7 @@ export const CleanCmd = utilityCmd({
|
|||
}
|
||||
}
|
||||
|
||||
let responseMsg: Message;
|
||||
let responseMsg: Message | undefined;
|
||||
if (messagesToClean.length > 0) {
|
||||
const cleanResult = await cleanMessages(pluginData, targetChannel, messagesToClean, msg.author);
|
||||
|
||||
|
@ -157,7 +157,7 @@ export const CleanCmd = utilityCmd({
|
|||
// (so as not to spam the cleaned channel with the command itself)
|
||||
setTimeout(() => {
|
||||
msg.delete().catch(noop);
|
||||
responseMsg.delete().catch(noop);
|
||||
responseMsg?.delete().catch(noop);
|
||||
}, CLEAN_COMMAND_DELETE_DELAY);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue