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
backend/src/plugins/ModActions/functions

View file

@ -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;