mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-11 20:55:01 +00:00
use User#displayAvatarURL and dont encode reason
This commit is contained in:
parent
b4ba1daa76
commit
f9e1343003
9 changed files with 9 additions and 12 deletions
|
@ -80,7 +80,7 @@ export async function banUserId(
|
|||
const deleteMessageDays = Math.min(30, Math.max(0, banOptions.deleteMessageDays ?? 1));
|
||||
await pluginData.guild.bans.create(userId as Snowflake, {
|
||||
days: deleteMessageDays,
|
||||
reason: reason != null ? encodeURIComponent(reason) : undefined,
|
||||
reason: reason ?? undefined,
|
||||
});
|
||||
} catch (e) {
|
||||
let errorMessage;
|
||||
|
|
|
@ -49,7 +49,7 @@ export async function kickMember(
|
|||
pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_KICK, member.id);
|
||||
ignoreEvent(pluginData, IgnoredEventType.Kick, member.id);
|
||||
try {
|
||||
await member.kick(reason != null ? encodeURIComponent(reason) : undefined);
|
||||
await member.kick(reason ?? undefined);
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "failed",
|
||||
|
|
|
@ -32,10 +32,7 @@ export async function outdatedTempbansLoop(pluginData: GuildPluginData<ModAction
|
|||
);
|
||||
try {
|
||||
ignoreEvent(pluginData, IgnoredEventType.Unban, tempban.user_id);
|
||||
await pluginData.guild.bans.remove(
|
||||
tempban.user_id as Snowflake,
|
||||
reason != null ? encodeURIComponent(reason) : undefined,
|
||||
);
|
||||
await pluginData.guild.bans.remove(tempban.user_id as Snowflake, reason ?? undefined);
|
||||
} catch (e) {
|
||||
pluginData.state.serverLogs.log(LogType.BOT_ALERT, {
|
||||
body: `Encountered an error trying to automatically unban ${tempban.user_id} after tempban timeout`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue