mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
14 lines
408 B
TypeScript
14 lines
408 B
TypeScript
import { AllowedMentions, Bot, DiscordAllowedMentions } from "../../mod.ts";
|
|
|
|
export function transformAllowedMentionsToDiscordAllowedMentions(
|
|
bot: Bot,
|
|
mentions: AllowedMentions,
|
|
): DiscordAllowedMentions {
|
|
return {
|
|
parse: mentions.parse,
|
|
replied_user: mentions.repliedUser,
|
|
users: mentions.users?.map((id) => id.toString()),
|
|
roles: mentions.roles?.map((id) => id.toString()),
|
|
};
|
|
}
|