Skip to content

ReactionEmoji.Unicode - poorly documented #615

@deanveloper

Description

@deanveloper

public data class Unicode(override val name: String) : ReactionEmoji() {

I know 2 people now who have been fooled by this, mainly because the parameter to Unicode is name, which implies that airplane should be put in instead of ✈️. However, the discord API (and kord by transitivity) expects ✈️. It's not intuitive because basically the entire rest of discord uses names for emojis, but reactions use raw emojis.

Solutions:

  1. Change name to something else
  2. Add KDoc
  3. Do some basic validation, ie if (name.all { it.isLetterOrDigit }) and throw a descriptive error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions