Closed2
discord の webhook で mention したい
const user_id = '502486808211357707';
const mention_string = `<@!${user_id}>`;
export const sendDiscordMessage = async (
message: string,
discordWebhookUrl: DiscordWebhookUrl,
) => {
// send message to Discord webhook
await axios.post(discordWebhookUrl.url, {
content:
message +
'\n' +
mention_string +
'\n' +
'@tkt' +
'\n' +
'@tkt#6539'
allowed_mentions: {
parse: ['users'],
},
});
};
502486808211357707
のような user_id がわからないと mention できないのがつらい
このスクラップは2022/04/03にクローズされました