m->d: Users who aren't joined can be mentioned

This works by writing @name in the message, where `name` is the username
or displayname of the person in the guild you want to mention. If it
matched, the person will be joined and mentioned on their side.

Unfortunately this requires you to guess the person's name, and may lead
to embarrassment if it doesn't activate as you intended. Good luck!
This commit is contained in:
Cadence Ember 2023-11-23 13:41:02 +13:00
parent 39528b0557
commit 53a009ca45
3 changed files with 120 additions and 3 deletions

View file

@ -73,7 +73,7 @@ async function sendEvent(event) {
// no need to sync the matrix member to the other side. but if I did need to, this is where I'd do it
let {messagesToEdit, messagesToSend, messagesToDelete} = await eventToMessage.eventToMessage(event, guild, {api})
let {messagesToEdit, messagesToSend, messagesToDelete} = await eventToMessage.eventToMessage(event, guild, {api, snow: discord.snow})
messagesToEdit = await Promise.all(messagesToEdit.map(async e => {
e.message = await resolvePendingFiles(e.message)