3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-11 04:45:02 +00:00

fix: encode reason

This commit is contained in:
almeidx 2020-07-28 21:27:36 +01:00
parent d4f12ca1c8
commit ecc25bd2e3
5 changed files with 5 additions and 5 deletions

View file

@ -88,7 +88,7 @@ export async function actualKickMemberCmd(
ignoreEvent(pluginData, IgnoredEventType.Unban, memberToKick.id);
try {
await pluginData.guild.unbanMember(memberToKick.id, reason);
await pluginData.guild.unbanMember(memberToKick.id, encodeURIComponent(reason));
} catch (e) {
sendErrorMessage(pluginData, msg.channel, "Failed to unban the user after banning them (-clean)");
}

View file

@ -40,7 +40,7 @@ export async function banUserId(
ignoreEvent(pluginData, IgnoredEventType.Ban, userId);
try {
const deleteMessageDays = Math.min(30, Math.max(0, banOptions.deleteMessageDays ?? 1));
await pluginData.guild.banMember(userId, deleteMessageDays, reason);
await pluginData.guild.banMember(userId, deleteMessageDays, encodeURIComponent(reason));
} catch (e) {
return {
status: "failed",