3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Don't send null/undefined as audit log reasons

This commit is contained in:
Dragory 2020-08-05 02:54:02 +03:00
parent b2a67523a1
commit ceb567ad9a
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
4 changed files with 8 additions and 4 deletions

View file

@ -46,7 +46,7 @@ export const UnbanCmd = modActionsCommand({
try {
ignoreEvent(pluginData, IgnoredEventType.Unban, user.id);
await pluginData.guild.unbanMember(user.id, encodeURIComponent(reason));
await pluginData.guild.unbanMember(user.id, reason != null ? encodeURIComponent(reason) : undefined);
} catch (e) {
sendErrorMessage(pluginData, msg.channel, "Failed to unban member; are you sure they're banned?");
return;