discard2
discard2 copied to clipboard
Get server emojis
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.
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?