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

feat: new username support vol 2

This commit is contained in:
Dragory 2023-06-24 12:07:58 +00:00
parent ecaa16bf7c
commit 63c41f0278
29 changed files with 105 additions and 64 deletions

View file

@ -1,5 +1,6 @@
import { Snowflake } from "discord.js";
import * as t from "io-ts";
import { renderUserUsername } from "../../../utils";
import { consumeIgnoredRoleChange } from "../functions/ignoredRoleChanges";
import { automodTrigger } from "../helpers";
@ -37,7 +38,7 @@ export const RoleAddedTrigger = automodTrigger<RoleAddedMatchResult>()({
const role = pluginData.guild.roles.cache.get(matchResult.extra.matchedRoleId as Snowflake);
const roleName = role?.name || "Unknown";
const member = contexts[0].member!;
const memberName = `**${member.user.tag}** (\`${member.id}\`)`;
const memberName = `**${renderUserUsername(member.user)}** (\`${member.id}\`)`;
return `Role ${roleName} (\`${matchResult.extra.matchedRoleId}\`) was added to ${memberName}`;
},
});