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 create guilds even if they are in more than 10 guilds, but not if they own 10 or more #1300

Closed andyearnshaw closed 4 years ago

andyearnshaw commented 4 years ago

This is a request to change POST /guilds, which currently states:

This endpoint can be used only by bots in less than 10 guilds. Assigning a channel to a channel category is not supported by this endpoint, i.e. a channel can't have the parent_id field.

I'd like it to be permitted to create a new guild as long as the bot is not the current owner of 10 or more guilds. If I'd anticipated that I needed my bot to create some guilds then I would have done so from the start, but now that it is in a few hundred guilds it appears I cannot add the functionality I want to my bot without leaving all of them first.

My use case is for my bot to manage its own emoji. When I created the bot, I made several guilds (for which I am the owner) to host the different emoji that it needed, and I currently add/remove emoji as required. Now I have other developers helping me, and they have duplicate bots. If they want to add/remove emoji they need to provide me with the emoji so that I can upload it to a server. If I run out of space, I need to make a new server and then invite each dev bot.

Skillz4Killz commented 4 years ago

Out of curiousity, why are bot's not allowed to create guilds?

.createschool => creates a whole discord server and sets it up to a template for a school. => Invites the message author => Transfers ownership.

ghost commented 4 years ago

Out of curiousity, why are bot's not allowed to create guilds?

.createschool => creates a whole discord server and sets it up to a template for a school. => Invites the message author => Transfers ownership.

Because you could make a large number to spam the api, guilds have a lot of info associated with them and probably are much slower to make than simple entities like messages.

One could argue there isnt really a good reason for a bot to own a guild really anyway in most cases

jhgg commented 4 years ago

Unfortunately it's very expensive to get that count so we are unable to do so.

andyearnshaw commented 4 years ago

That's a shame. Thanks for taking the time to respond.

One could argue there isnt really a good reason for a bot to own a guild really anyway in most cases

It would be much better if emoji could be uploaded for bots in the app interface instead of needing to create empty guilds, then I would agree with you. I figured that would be a much bigger change than this, though.

muddyfish commented 4 years ago

If that were to happen, it would be nice for bots themselves to upload emotes - currently I have a server the bot uploads ones it needs to use on

andyearnshaw commented 4 years ago

Yes, I mentioned the app interface to make the concept clear, but I would hope that there would be an endpoint for it also.