discard2 icon indicating copy to clipboard operation
discard2 copied to clipboard

Get server emojis

Open TheTechRobo opened this issue 3 years ago • 1 comments

This is listed in the README, but I figured I'd report it as an issue here for discussion.

Maybe this would work: https://discord.com/developers/docs/resources/emoji#list-guild-emojis

But if you don't want to manually make requests to the Discord API, I think this system would work:

  • For every channel encountered, see if you can type in it.
  • If so, click the emoji button.
  • If not, check if you can add a reaction to the latest message. If so, click the button to add one.
  • This opens the emoji picker. Scroll until you've scrolled through all emojis for that server.
  • If you couldn't open the emoji picker, try again in the next channel. Chances are, you'll eventually find a channel that meets either criteria.

TheTechRobo avatar Jun 18 '22 14:06 TheTechRobo

For what it's worth, Discord sends emoji data in websockets:

[...]
        {
          "emojis": [
            {
              "roles": [],
              "require_colons": true,
              "name": "BlobJobWHM",
              "managed": false,
              "id": "821173484633063476",
              "available": true,
              "animated": false
            },
            {
              "roles": [],
              "require_colons": true,
              "name": "BlobJobPLD",
              "managed": false,
              "id": "821173484834521120",
              "available": true,
              "animated": false
            },
            {
              "roles": [],
              "require_colons": true,
              "name": "BlobJobSAM",
              "managed": false,
              "id": "821173485011075143",
              "available": true,
              "animated": false
            },
            {
              "roles": [],
              "require_colons": true,
              "name": "BlobJobNIN",
              "managed": false,
              "id": "821173485018808391",
              "available": true,
              "animated": false
            },
            {
              "roles": [],
              "require_colons": true,
              "name": "BlobJobWAR",
              "managed": false,
              "id": "821173485324861480",
              "available": true,
              "animated": false
            },
[...]

As such, I'm going to add this feature to my URL extractor.

Do you think this is out of scope for discard2?

TheTechRobo avatar Jul 08 '22 16:07 TheTechRobo