discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.96k stars 1.26k forks source link

Allow bots to use all emotes #1696

Closed muddyfish closed 3 years ago

muddyfish commented 4 years ago

Currently, a bot is able to use emotes from servers it's part of, as they get Nitro perks for emote usage. This is super helpful for some things like welcome messages, reaction menus and the like.

However, bots are limited to emotes from servers they are currently in, so these features will break if say a user with Nitro wants a welcome message with emotes from their servers that the bot isn't in for instance.

The current 'solution' for this is to create a dedicated emote server (or more!) for your bot and upload the emotes you want your bot to be able to use, if statically predetermined. Otherwise, you end up with a few servers that end up effectively acting as emote caches for your bot when it needs to send messages with certain emotes.

Whilst this does work pretty well, as the actual number of visually unique emotes is pretty low, it would probably be much less strain on developer and Discord's resources if bots were able to use emotes from servers they aren't in. I imagine this would be implemented easiest by simply removing the check for 'does this message contain invalid emoji' for messages sent with a bot token.

0x57e11a commented 4 years ago

Useful, but easily abusable, if you can use emotes from any server (think: people's private servers they don't want their emotes leaked from), someone is bound to find emojis from other servers by complete chance.

TL;DR: Good idea at, but could be used badly

advaith1 commented 4 years ago

You can already load the image for any emoji with just the id, and you would need the id to send it

The only thing this would change is adding the ability to send it inline instead of as an image attachment.

0x57e11a commented 4 years ago

Fair point, I guess it's already abusable

TapuCosmo commented 4 years ago

If this is done, do it for webhooks too.

advaith1 commented 4 years ago

@TapuCosmo It was added for webhooks a few weeks ago

TapuCosmo commented 4 years ago

So webhooks can now use any emojis without needing a bot token?

advaith1 commented 4 years ago

yes

GoldenAngel2 commented 4 years ago

@advaith1 are you sure it works for webhooks at the moment?

muddyfish commented 4 years ago

yes

Andre601 commented 4 years ago

Webhooks require to have the emote on the same guild they're created in.

AEnterprise commented 4 years ago

no webhooks can use all emoji from all guilds, it does require the everyone role to have use external emoji perms in the channel

Andre601 commented 4 years ago

no webhooks can use all emoji from all guilds, it does require the everyone role to have use external emoji perms in the channel

My personal experience tells me otherwise. I grant usage of external emotes, yet the webhook can't display any that aren't in other Discord Servers.

muddyfish commented 4 years ago

Can we please keep this thread on the topic of allowing this for bot users, and not webhooks?

advaith1 commented 4 years ago

This would also be very useful for bots that repost content from normal users such as starboard bots; there isn't a workaround for those like there is for admin-set or dev-set emojis.

Skye-31 commented 4 years ago

For a starboard bot now, you could actually use webhooks, which are able to use all emojis, as they are now capable of editing and deleting messages

muddyfish commented 4 years ago

Webhooks technically can't use all emojis, they need to be non deleted and they can't be unavailable (from a guild which lost a boost causing the emoji to grey out). Possibly also emojis that are role locked but I can't remember that.

0x57e11a commented 3 years ago

Webhooks technically can't use all emojis, they need to be non deleted and they can't be unavailable (from a guild which lost a boost causing the emoji to grey out). Possibly also emojis that are role locked but I can't remember that.

Those are reasonable restrictions.

Joshix-1 commented 3 years ago

Webhooks can use Twitch-Emotes from other servers.