3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-16 06:35:03 +00:00

feat: new username support

This commit is contained in:
Dragory 2023-06-24 10:41:02 +00:00
parent 514e93aa23
commit 0e70412bc4
8 changed files with 42 additions and 20 deletions

View file

@ -1,7 +1,7 @@
import { ActivityType, Embed } from "discord.js";
import { GuildPluginData } from "knub";
import { SavedMessage } from "../../../data/entities/SavedMessage";
import { resolveMember } from "../../../utils";
import { renderUsername, resolveMember } from "../../../utils";
import { DeepMutable } from "../../../utils/typeUtils.js";
import { AutomodPluginType } from "../types";
@ -46,7 +46,7 @@ export async function* matchMultipleTextTypesOnMessage(
}
if (trigger.match_usernames) {
yield ["username", `${msg.data.author.username}#${msg.data.author.discriminator}`];
yield ["username", renderUsername(msg.data.author.username, msg.data.author.discriminator)];
}
if (trigger.match_nicknames && member.nickname) {