Skip to content
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

Merged
merged 4 commits into from Aug 3, 2017

Conversation

@msciotti
Copy link
Contributor

commented Jul 31, 2017

No description provided.

@msciotti msciotti requested a review from vishnevskiy Jul 31, 2017

z64 added a commit to z64/discordrb that referenced this pull request Jul 31, 2017

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.
discordapp/discord-api-docs#329

z64 added a commit to z64/discordrb that referenced this pull request Jul 31, 2017

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.
discordapp/discord-api-docs#329

z64 added a commit to z64/discordrb that referenced this pull request Jul 31, 2017

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.
discordapp/discord-api-docs#329

z64 added a commit to z64/discordrb that referenced this pull request Jul 31, 2017

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.
discordapp/discord-api-docs#329

foxbot added a commit to discord-net/Discord.Net that referenced this pull request Jul 31, 2017

Changed Guild#DefaultChannel to resolve the first accessible channel
Resolves #776

This change is inline with discordapp/discord-api-docs#329

RestGuild#DefaultChannelId is now obsolete and will throw a
NotSupportedException.

@msciotti msciotti changed the title Semi-breaking change about default channels Breaking change about default channels Jul 31, 2017


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.

This comment has been minimized.

Copy link
@Pyker

Pyker Jul 31, 2017

Existing guilds are unaffected.

Does that mean that existing guilds will still have a default channel/not be able to delete the default channel?

This comment has been minimized.

Copy link
@msciotti

msciotti Jul 31, 2017

Author Contributor

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.

This comment has been minimized.

Copy link
@Pyker

Pyker Jul 31, 2017

Ah I see. Thank you for the clarification!

@@ -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.

This comment has been minimized.

Copy link
@night

night Aug 1, 2017

Member

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

This comment has been minimized.

Copy link
@khazhyk

khazhyk Aug 1, 2017

Contributor

Default now will also only apply to new joiners, with a users last open channel remembered across sessions, right?

This comment has been minimized.

Copy link
@jhgg

jhgg Aug 1, 2017

Member

Correct.


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.

This comment has been minimized.

Copy link
@night

night Aug 1, 2017

Member

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

@@ -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:

This comment has been minimized.

Copy link
@night

night Aug 1, 2017

Member

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

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

This comment has been minimized.

Copy link
@night

night Aug 1, 2017

Member

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

This comment has been minimized.

Copy link
@msciotti

msciotti Aug 1, 2017

Author Contributor

That's really weird. Git must have gotten messy - these changes shouldn't be here. Removing them.

@@ -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.

This comment has been minimized.

Copy link
@devsnek

devsnek Aug 1, 2017

Contributor

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.

This comment has been minimized.

Copy link
@night

night Aug 1, 2017

Member

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

@vladfrangu vladfrangu referenced this pull request Aug 2, 2017
2 of 3 tasks complete

@msciotti msciotti merged commit 2a15a70 into master Aug 3, 2017

@msciotti msciotti deleted the feature/RemoveDefaultChannels branch Aug 3, 2017

AlienIdeology added a commit to AlienIdeology/J-Cord that referenced this pull request Aug 4, 2017

z64 added a commit to z64/discordrb that referenced this pull request Aug 8, 2017

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.
discordapp/discord-api-docs#329

z64 added a commit to z64/discordrb that referenced this pull request Aug 9, 2017

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.
discordapp/discord-api-docs#329

z64 added a commit to meew0/discordrb that referenced this pull request Aug 9, 2017

Update concept of "default channel" per API change (#382)
* 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.
discordapp/discord-api-docs#329

* removes special #default_channel handling in Channel#users

foxbot added a commit to discord-net/Discord.Net that referenced this pull request Aug 28, 2017

Changed Guild#DefaultChannel to resolve the first accessible channel (#…
…777)

* Changed Guild#DefaultChannel to resolve the first accessible channel

Resolves #776

This change is inline with discordapp/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.

FiniteReality added a commit to FiniteReality/Discord.Net that referenced this pull request May 5, 2018

Changed Guild#DefaultChannel to resolve the first accessible channel (d…
…iscord-net#777)

* Changed Guild#DefaultChannel to resolve the first accessible channel

Resolves discord-net#776

This change is inline with discordapp/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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.