serenity
serenity copied to clipboard
Misleading documentation
The documentation found in docsrs falsely states that a guild's GuildId is equivalent to the guild's @everyone-role and its #general channel, when this is in fact not the case.
Well the id of a guild is equal to the id of the everyone role in this guild, and it is also the case if the server is old and still has a #general channel.
After more research it seems that I was wrong the statement applies for @everyone but I still haven't seen a guild where #general has the same id as the guild (usually it's really close to it but not the same)
I remember it was for guilds with an ID that's 17 characters long or where the first 2 numbers are under or equal to 20 (if 18 in lenght) and still have the original V-General and #general have the same ID
somewhat proof: https://5124.16-b.it/ss/01:03:31_08-11-2021.mp4
Cool! I guess I'm not that "OG" of a discord-user that I would've noticed this. Nevertheless most servers don't have the same guildid and #general-id which is ignored in the documentation.
For whoever implements this: the problem is here https://docs.rs/serenity/latest/serenity/model/guild/struct.Guild.html#structfield.id and here https://docs.rs/serenity/latest/serenity/model/channel/struct.GuildChannel.html#structfield.id