New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking change about default channels #329
Conversation
Resolves #776 This change is inline with discord/discord-api-docs#329 RestGuild#DefaultChannelId is now obsolete and will throw a NotSupportedException.
docs/Change_Log.md
Outdated
|
||
After today, we are removing the existing concept of a default channel from Discord. We saw a use case in many servers where the previously-default #general channel was being repurposed as an announcement-only, non-writable channel for new members. In practice, server owners were using bots to clear the entire message history of the default channel in order to change its purpose. Now that channel can simply be deleted and re-created with the desired permissions. | ||
|
||
From now on, new servers will no longer have a default channel with the same snowflake id as its guild. Existing guilds are unaffected. This means that your library can no longer assume that channel as a default. The "default" channel for a given user is now the channel with the highest position that their permissions allow them to see. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existing guilds are unaffected.
Does that mean that existing guilds will still have a default channel/not be able to delete the default channel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry that needs clarification. It means that existing guilds will not have their #general
channel id changed. It will, however, no longer be the default channel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see. Thank you for the clarification!
docs/Change_Log.md
Outdated
@@ -3,6 +3,12 @@ | |||
>danger | |||
>API and Gateway versions below v6 will be discontinued on October 16, 2017, after which they will be non-functioning. | |||
|
|||
## July 31, 2017 - Breaking Change | |||
|
|||
After today, we are removing the existing concept of a default channel from Discord. We saw a use case in many servers where the previously-default #general channel was being repurposed as an announcement-only, non-writable channel for new members. In practice, server owners were using bots to clear the entire message history of the default channel in order to change its purpose. Now that channel can simply be deleted and re-created with the desired permissions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this first sentence is a bit misleading, perhaps we can clarify. we are not removing the concept of a default channel, just changing how "default" works.. so perhaps "changing how default channels function" might be better phrasing.
I also think we should drop the line about people using bots to clear the history, since the line before and after it offers enough context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default now will also only apply to new joiners, with a users last open channel remembered across sessions, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
docs/Change_Log.md
Outdated
|
||
After today, we are removing the existing concept of a default channel from Discord. We saw a use case in many servers where the previously-default #general channel was being repurposed as an announcement-only, non-writable channel for new members. In practice, server owners were using bots to clear the entire message history of the default channel in order to change its purpose. Now that channel can simply be deleted and re-created with the desired permissions. | ||
|
||
From now on, new servers will no longer have a default channel with the same snowflake id as its guild. Existing guilds are unaffected. This means that your library can no longer assume that channel as a default. The "default" channel for a given user is now the channel with the highest position that their permissions allow them to see. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: snowflake is implied, so just ID
would be fine
should also dictate that it is possible to not have a "default" channel if they have no permissions
docs/topics/Permissions.md
Outdated
@@ -48,6 +48,14 @@ Permissions follow a hierarchy with the following roles: | |||
* Bots can only sort roles lower than their highest role. | |||
* Bots can only kick/ban users of with a lower highest role than themselves. | |||
|
|||
In the case of permissions overlapping with each other—e.g. a user's role is banned from seeing a channel, but the user has a specific override—they are applied to a user in the following order: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should really be in a separate heading called ## Permission Calculation
since hierarchy is just how your permissions on the guild respect the order of the roles list.
nit: would prefer moving the example to the end of the sentence, maybe wrapping in parens instead
docs/topics/Permissions.md
Outdated
In the case of permissions overlapping with each other—e.g. a user's role is banned from seeing a channel, but the user has a specific override—they are applied to a user in the following order: | ||
|
||
1. Base permissions (@everyone) are applied | ||
2. All permissions for the roles assigned to a user are applied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be useful to clarify how these guild-level permissions are applied (roles are all ORed, hierarchy only matters for cases dictated above), but then again maybe that's obvious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's really weird. Git must have gotten messy - these changes shouldn't be here. Removing them.
docs/Change_Log.md
Outdated
@@ -3,6 +3,14 @@ | |||
>danger | |||
>API and Gateway versions below v6 will be discontinued on October 16, 2017, after which they will be non-functioning. | |||
|
|||
## August 1, 2017 - Breaking Change | |||
|
|||
After today, we are changing how default channels function. The "default" channel for a given user is now the channel with the highest position that their permissions allow them to see. New guilds will no longer have a default channel with the same id as the guild. Existing guilds will not have their #general channel id changed. It is possible, if permissions are set in such a way, that a user will not have a default channel in a guild. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be clear, this is the highest channel that the @everyone
role can see right? The wording between here and stuff i've seen jake say isn't very clear on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default channel is the first channel in the sorted channel list that a user can access. for a user joining that would probably be the @everyone
role since they would not have a role assigned to them
* reimplement Server#default_channel for breaking API change Discord has updated their API to remove the previous concept of the "default channel" being the channel with the same snowflake ID as the guild. It is now described as ".. the channel with the highest position that their (the client) allows them to see (read)". This change also allows "default channels" to be deleted and hidden just like any other channel. discord/discord-api-docs#329 * removes special #default_channel handling in Channel#users
…777) * Changed Guild#DefaultChannel to resolve the first accessible channel Resolves #776 This change is inline with discord/discord-api-docs#329 RestGuild#DefaultChannelId is now obsolete and will throw a NotSupportedException. * RestGuild#DefaultChannelId will fall back to the guild ID Adding an exception here would be a breaking change, so this was agreed to fall back to the previous behavior, which would just return the guild ID.
…iscord-net#777) * Changed Guild#DefaultChannel to resolve the first accessible channel Resolves discord-net#776 This change is inline with discord/discord-api-docs#329 RestGuild#DefaultChannelId is now obsolete and will throw a NotSupportedException. * RestGuild#DefaultChannelId will fall back to the guild ID Adding an exception here would be a breaking change, so this was agreed to fall back to the previous behavior, which would just return the guild ID.
As of [#329](discord/discord-api-docs#329) the discord api no longer recognises "default channels" for servers. Instead, we iterate through all channels to find the highest permission available.
No description provided.