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

use User#displayAvatarURL and dont encode reason

This commit is contained in:
almeidx 2021-07-28 23:40:20 +01:00
parent b4ba1daa76
commit f9e1343003
No known key found for this signature in database
GPG key ID: 8558FBFF849BD664
9 changed files with 9 additions and 12 deletions

View file

@ -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`,