Maselkov / Maselkov-Cogs

Collection of cogs for Red-Discordbot
MIT License
2 stars 3 forks source link

Display icons for gear #12

Closed n1tr0-5urf3r closed 7 years ago

n1tr0-5urf3r commented 7 years ago

I'm currently trying to get the icons for character gear displayed, but the bot doesn't embed the icon preview. Only the full url to the icon via api is displayed. Any idea to fix this?

n1tr0-5urf3r commented 7 years ago

It looks like the .png can't be displayed inline with the text Maybe it is possible to create a temporary server emoji out of the file, add it to msg and remove it afterwards?

Maselkov commented 7 years ago

I'm not sure if individual embed fields can display icons - refer to this. But it's worth looking into.

Maselkov commented 7 years ago

The emoji idea is clever. Discord.py does have an endpoint for adding custom emojis.

n1tr0-5urf3r commented 7 years ago

I'm not yet that much into python/Discord API, but it seems like you can't create Emojis from a URL. So we have to download it temporarily first, create emoji, and delete both? Also Emojis seem to stay in chat history, even if you delete them from the server.

Maselkov commented 7 years ago

Yes, downloading temporarily is the way in this case.

As for the second point, that's great to hear - it was my biggest worry for this solution.