Mutes: don't crash if the loading message for !mutes was already deleted
This commit is contained in:
parent
633da55ccf
commit
d1a9cf6dc9
1 changed files with 5 additions and 2 deletions
|
@ -8,6 +8,7 @@ import {
|
|||
DBDateFormat,
|
||||
errorMessage,
|
||||
INotifyUserResult,
|
||||
noop,
|
||||
notifyUser,
|
||||
NotifyUserStatus,
|
||||
stripObjectToScalars,
|
||||
|
@ -433,7 +434,9 @@ export class MutesPlugin extends ZeppelinPlugin<IMutesPluginConfig> {
|
|||
|
||||
lines.push(
|
||||
...manuallyMutedMembers.map(member => {
|
||||
return `<@!${member.id}> (**${member.user.username}#${member.user.discriminator}**, \`${member.id}\`) 🔧 Manual mute`;
|
||||
return `<@!${member.id}> (**${member.user.username}#${member.user.discriminator}**, \`${
|
||||
member.id
|
||||
}\`) 🔧 Manual mute`;
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
@ -447,7 +450,7 @@ export class MutesPlugin extends ZeppelinPlugin<IMutesPluginConfig> {
|
|||
message = hasFilters ? "No mutes found with the specified filters!" : "No active mutes!";
|
||||
}
|
||||
|
||||
await loadingMessage.delete();
|
||||
await loadingMessage.delete().catch(noop);
|
||||
const chunks = chunkMessageLines(message);
|
||||
for (const chunk of chunks) {
|
||||
msg.channel.createMessage(chunk);
|
||||
|
|
Loading…
Add table
Reference in a new issue