discord / discord-api-docs

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

Allow bots to be added to servers with server templates #1767

Closed muddyfish closed 3 years ago

muddyfish commented 4 years ago

Server templates should be able to include bots that are in the origin server.

It would be nice if some form of 'state' parameter could be included with the template which bots could use to configure the new server, such as a default prefix. If multiple bots can be included per server, this state should be able to be settable per bot, so multiple bots can read different states for them automatically.

Bots should request/inherit their permissions from their managed roles from the origin server on the new one.

EDIT:

Alternatively as suggested below, there could be an optional 'template id' parameter in the GUILD_CREATE event, which can then be used to look up the previous settings from some database.

This would be supplemented by an event when a template is created, or updated in the origin server. If the bot is destined to be a member of servers generated by that template, it should receive these events regardless of permissions to view templates otherwise.

TheArcaneBrony commented 4 years ago

maybe the state parameter is a bad idea, but maybe an optional argument for the guild_join event, with the guild id the template was made from?

muddyfish commented 4 years ago

That would also work for that

TheRockettek commented 4 years ago

It is fine until the template has a malicious bot hiding within a list of like 40 bots you do not realise as you gloss over it.

muddyfish commented 4 years ago

I'd imagine 40 bots is probably too many to include automatically at once, it'll probably be limited. And luckily there's not too much lost if a nuker bot gets included in a templated server that's just been created^^

advaith1 commented 4 years ago

img