Don't send null/undefined as audit log reasons
This commit is contained in:
parent
b2a67523a1
commit
ceb567ad9a
4 changed files with 8 additions and 4 deletions
|
@ -64,7 +64,7 @@ export const ForcebanCmd = modActionsCommand({
|
|||
pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_BAN, user.id);
|
||||
|
||||
try {
|
||||
await pluginData.guild.banMember(user.id, 1, encodeURIComponent(reason));
|
||||
await pluginData.guild.banMember(user.id, 1, reason != null ? encodeURIComponent(reason) : undefined);
|
||||
} catch (e) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Failed to forceban member");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue