Skip to content

Commit

Permalink
fix(discord): unhandled behaviour on discord mobile (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shir0ha authored and shigma committed Feb 13, 2022
1 parent 998141a commit 8d52f80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/adapter/discord/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function adaptMessage(bot: DiscordBot, meta: DC.Message, session: Partial
if (meta.mention_roles.includes(id)) {
return segment('at', { role: id })
} else {
const user = meta.mentions?.find(u => u.id === id)
const user = meta.mentions?.find(u => u.id === id || `${u.username}#${u.discriminator}` === id)
return segment.at(id, { name: user?.username })
}
})
Expand Down

0 comments on commit 8d52f80

Please sign in to comment.