removed unnecessary encodeURIComponent on reasons
This commit is contained in:
parent
f9e1343003
commit
ca30dd204e
3 changed files with 4 additions and 7 deletions
|
@ -95,7 +95,7 @@ export const MassbanCmd = modActionsCmd({
|
||||||
|
|
||||||
await pluginData.guild.bans.create(userId as Snowflake, {
|
await pluginData.guild.bans.create(userId as Snowflake, {
|
||||||
days: deleteDays,
|
days: deleteDays,
|
||||||
reason: banReason != null ? encodeURIComponent(banReason) : undefined,
|
reason: banReason ?? undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
await casesPlugin.createCase({
|
await casesPlugin.createCase({
|
||||||
|
|
|
@ -60,10 +60,7 @@ export const MassunbanCmd = modActionsCmd({
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await pluginData.guild.bans.remove(
|
await pluginData.guild.bans.remove(userId as Snowflake, unbanReason ?? undefined);
|
||||||
userId as Snowflake,
|
|
||||||
unbanReason != null ? encodeURIComponent(unbanReason) : undefined,
|
|
||||||
);
|
|
||||||
|
|
||||||
await casesPlugin.createCase({
|
await casesPlugin.createCase({
|
||||||
userId,
|
userId,
|
||||||
|
|
|
@ -82,7 +82,7 @@ export async function actualKickMemberCmd(
|
||||||
ignoreEvent(pluginData, IgnoredEventType.Ban, memberToKick.id);
|
ignoreEvent(pluginData, IgnoredEventType.Ban, memberToKick.id);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await memberToKick.ban({ days: 1, reason: encodeURIComponent("kick -clean") });
|
await memberToKick.ban({ days: 1, reason: "kick -clean" });
|
||||||
} catch {
|
} catch {
|
||||||
sendErrorMessage(pluginData, msg.channel, "Failed to ban the user to clean messages (-clean)");
|
sendErrorMessage(pluginData, msg.channel, "Failed to ban the user to clean messages (-clean)");
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ export async function actualKickMemberCmd(
|
||||||
ignoreEvent(pluginData, IgnoredEventType.Unban, memberToKick.id);
|
ignoreEvent(pluginData, IgnoredEventType.Unban, memberToKick.id);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await pluginData.guild.bans.remove(memberToKick.id, encodeURIComponent("kick -clean"));
|
await pluginData.guild.bans.remove(memberToKick.id, "kick -clean");
|
||||||
} catch {
|
} catch {
|
||||||
sendErrorMessage(pluginData, msg.channel, "Failed to unban the user after banning them (-clean)");
|
sendErrorMessage(pluginData, msg.channel, "Failed to unban the user after banning them (-clean)");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue