Kord-Extensions/kord-extensions

Emoji converter doesn't work with custom emojis

zt64 opened this issue · 5 comments

zt64 commented

Description

Emoji converter throws not found error for all custom emojis.

image

Versions

Kord Extensions: 1.5.5-SNAPSHOT

Reproduction

val emoji by emoji {
    name = "emoji"
    description = "The emoji"
}

Hello, and thanks for opening an issue! As this is the first time you've created an issue on this repository, we'd just like to offer you a warm welcome to the project, and the following pointers:

  • Most importantly, all issues must adhere to our Code of Conduct. Please give it a quick read if you haven't already.

  • While our team is passionate about the projects we've created here, we're all volunteers. Please don't be offended if it takes time for us to get to your issue - we'll be here as soonas we can be!

  • Please provide as much information as possible when asking a question, reporting a problem, or submitting a feature request. This will help us to address your issue quickly and efficiently. If you forgot to add some information, no worries - feel free to edit the issue and add anything you missed!

    Thanks for contacting us! If you have any further questions, please feel free to join us on Discord in the #dev-kotdis channel (or #kordex-discussion for Kord Extensions projects), or to contact a staff member directly.

The code appears as if it should work as intended, but I can see Kord's caching potentially getting in the way. Still, please check the following:

  • That you have the necessary intents to see guild emoji
  • That you're using an emoji that exists on a guild the bot is present on
  • If that doesn't help, that the bot has permission to manage emojis on the server

If none of these things help, report back and let me know.

Additionally, it's possible that this converter isn't actually all that useful in the long run - maybe it should return some other type? I'm not sure how best to change it, because you need a guild ID in order to grab a GuildEmoji object. It's possible that Kord hasn't implemented the logic to make this kind of converter realistic.

zt64 commented

Turns out adding the Intent.GuildEmojis fixed it. Maybe there should be documentation added to the emoji that says it will need that intent.