Skip to content

feat(discord): auto-resolve guild emoji names#3

Merged
sragss merged 1 commit intomainfrom
craig/guild-emoji-resolve
Mar 7, 2026
Merged

feat(discord): auto-resolve guild emoji names#3
sragss merged 1 commit intomainfrom
craig/guild-emoji-resolve

Conversation

@sragss
Copy link

@sragss sragss commented Mar 7, 2026

Summary

  • When reacting with a plain emoji name like fatbiden, resolves it to fatbiden:1471188095478137007 by looking up guild emojis via the Discord API
  • Guild emoji list cached for 5 minutes per guild
  • Existing behavior unchanged for unicode emoji, name:id format, and <:name:id> syntax
  • Falls through gracefully if channel has no guild (DMs) or emoji not found

Files

  • src/discord/guild-emoji-cache.ts — new file, TTL-cached guild emoji resolver
  • src/discord/send.reactions.ts — resolve before normalize in reactMessageDiscord
  • src/discord/send.sends-basic-channel-messages.test.ts — 3 new tests

When reacting with a plain emoji name like 'fatbiden', resolve it to
'fatbiden:1471188095478137007' by looking up guild emojis. Guild emoji
list is cached for 5 minutes per guild.

Existing behavior unchanged for unicode emoji, name:id format, and
full <:name:id> syntax.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sragss sragss merged commit 2a89ddb into main Mar 7, 2026
1 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant