discord / discord-api-docs

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

New(s) Channel Type #881

Closed jixwanwang closed 4 years ago

jixwanwang commented 5 years ago

New News Channel

We're adding news channels! Now you can separate important news and important memes in guilds. Also, channels can now change type!

What's New

The new channel type is GUILD_NEWS=5. News channels can be interacted with the same way Guild Text channels can be - it's kinda like a reskinned text channel.

News channels are only available to some verified guilds (for now).

Changing Types? What?

For the first time in Discord history, channels can change types. This is limited to GUILD_TEXT and GUILD_NEWS types, which can be interchanged. Can't change a voice channel to text channel, sorry folks!

Let us know if you have any questions!

queer commented 5 years ago
jixwanwang commented 5 years ago
Skillz4Killz commented 5 years ago

What is a news channel? So far the only thing mentioned that is different is that slow mode is removed. But why would anyone want to change a channel to news type?

MinnDevelopment commented 5 years ago

Why isn't this just a boolean flag like nsfw? It sounds like this is just a text channel with a new type. This is a somewhat breaking change for libraries since we never imagined that channels would suddenly start changing their types, so a proper reasoning would help understand this change. I'm currently very split on how we should handle this new type and the change of channel types.

ghost commented 5 years ago

I don't understand why a new type is needed for this. It just breaks down to a text channel with no slowmode and permission overwrites to deny send messages for everyone except those with manage messages perms. Just to show a different icon is not really a thrilling reasoning and I don't understand the reasoning behind it. Just to show it off? And now that they can change types, this will break a lot of libraries.

jhgg commented 5 years ago

News isn’t the only new channel type we will be creating. The channel type change is unfortunately necessary to facilitate the changing of existing text channels to news channels. Unfortunately, this means changing the channel type dynamically. I suspect if your bot library didn’t look for the type field in a channel update, this change shouldn’t affect you. The worst that might happen then is you treat it as a text channel which it already is - until you reconnect.

Given such a small % of servers have this, and the intent is for mods to post, if you were dependent on channel type to process messages, this tiny breakage is probably okay.

jhgg commented 5 years ago

The channel is a bit special. It’s how application (specifically game) owners will be able to post items to their news on activity feed.

Emzi0767 commented 5 years ago

I'm unclear on the "changing type" bit. Does this refer to the fact that update can now include type field?

Furthermore, bots should treat it as an otherwise regular text channel?

MinnDevelopment commented 5 years ago

I still don't understand why this needs to be a new channel type, what speaks against a boolean property?

AEnterprise commented 5 years ago

from what i've seen they are also working on other channel types (seen some stuff floating around about a store page channel) and those wouldn't be compatible with each other, so to my types makes a lot of sense if they are adding (or wanting to ad) more things down the line

Emzi0767 commented 5 years ago

If not a bool, perhaps flags? If it indeed is a regular text channel with a different icon it just makes more sense.

alula commented 5 years ago

Btw it seems that there's channel type 6 too, which according to the client source is GUILD_STORE, why you haven't told us about it since unknown channel types may break bots?

{"code": 50035, "errors": {"type": {"_errors": [{"code": "BASE_TYPE_CHOICES", "message": "Value must be one of (0, 2, 4, 6)."}]}}, "message": "Invalid Form Body"}
msciotti commented 5 years ago

@gabixdev hadn't begun rolling that one out yet. News channels were live in a couple servers. That channel type will start popping up in servers now and this issue will be updated.

Andre601 commented 5 years ago

I don't get what the reason behind that is, nor how I should imagine this since no verified guild I'm on has that yet (if it already is available of course)

Sei4or commented 5 years ago

If you want to see an example, the official Rocket League server uses the news channel. Along with a few other verified servers.

Andre601 commented 5 years ago

If you want to see an example, the official Rocket League server uses the news channel. Along with a few other verified servers.

That is..... disapointing to be honest,,,

Also if you already mention that guild.... Is this here a future thing possible for (verified) guilds or only a special case for this one? Because I'm on a verified guild and it doesn't have that as of now. image

queer commented 5 years ago

I can only assume that there's something else that hasn't been released yet that will be "special" for news channels. The Discord datamining repo suggests that there'll be some in-app editor-type thing for making special messages (embeds? posts? dunno the right word) for these channels, so I guess we'll have to wait and see what actually happens.

SinisterRectus commented 5 years ago

How are news channels of type = 5 sorted with respect to position? Are they treated as though they are type = 0 or are they sorted independently?

AEnterprise commented 5 years ago

@Andre601 all verified servers have the options of setting a banner in server settings from what i know

@msciotti there are some servers using the store channels already though (subnautica just to name an example but there are others as well i'm sure)

MinnDevelopment commented 5 years ago

news channels should be locked down in such a way that only users that can manage messages can send messages

Could the permissions section be updated for this? This is rather special behavior.

z64 commented 5 years ago

That sounds like it should be noted on the Create Message endpoint, with the other permissions required to use it.

Mehgugs commented 5 years ago

news channels should be locked down in such a way that only users that can manage messages can send messages

Does this mean it's something that news channels now enforce or is it describing a best practice for admins of the channels?

jixwanwang commented 5 years ago

@Mehgugs It is best practice for the permissions to be set that way.

MinnDevelopment commented 5 years ago

I might misunderstand but this sounds like the only difference between GUILD_TEXT and GUILD_NEWS is rate_limit_per_user. Is that correct?

jixwanwang commented 5 years ago

Yes, news and text channels follow the same rules and have the same properties except for rate_limit_per_user.

MinnDevelopment commented 5 years ago

Then whats the point of this type? It only limits your text channel features without any benefits?

night commented 5 years ago

I still don't understand why this needs to be a new channel type, what speaks against a boolean property? Then whats the point of this type? It only limits your text channel features without any benefits?

it's a news channel used as a surface to facilitate aggregation of news for games, which will display on the activity feed for users. we plan to add more functionality for news channels, but the initial release has them as essentially just text channels. types are the correct way to define the purpose of a channel, not booleans. nsfw makes sense as a boolean because it's stating a sideeffect of the channel, not the type of channel.

MinnDevelopment commented 5 years ago

it's a news channel used as a surface to facilitate aggregation of news for games, which will display on the activity feed for users

How is this not a side-effect?

we plan to add more functionality for news channels

Like what for example? Would be helpful to know future plans to properly implement it. Currently I would just add an empty interface.

nsfw makes sense as a boolean because it's stating a sideeffect of the channel, not the type of channel

That's debatable. What makes AFK channels not a different type? They have a clear purpose that is defined through a guild property rather than a type. Same with the system channel, how is that different from this?

If the difference is "you can have multiple news channels", why would you need that?

night commented 5 years ago

How is this not a side-effect?

It technically is a side-effect, but only in the sense that news channels themselves cause it. Text/Voice/etc channels cannot cause this side-effect. As an aside, technically NSFW channels could apply to voice/categories too, we just never ended up going that route (we may one day though, who really knows).

Like what for example? Would be helpful to know future plans to properly implement it. Currently I would just add an empty interface.

Unfortunately not able to share more than is public knowledge. You should know that by now :)

What makes AFK channels not a different type? They have a clear purpose that is defined through a guild property rather than a type. Same with the system channel, how is that different from this?

The AFK and system channels are ordinary channels which the guild applies extra functionality to. Implementation wise it makes sense to store this information on the guild, as knowing which channel is the AFK or system channel without knowing all channels is helpful when we perform operations on the server.

If the difference is "you can have multiple news channels", why would you need that?

We do permit multiple news channels. Some servers service multiple games, usually publisher/developer servers.

Skillz4Killz commented 5 years ago

What permission gives users the ability to change a channel type? Also, any idea when this is going to roll out to all verified servers?

queer commented 5 years ago

Store channels were just announced in the developer newsletter it seems; is there a timeframe for getting documentation for them? It looks like we got at least some of this as of 8dda8e04e4a08d96634a9bef2bcd1d75956acf1e

MinnDevelopment commented 5 years ago

It would be helpful to add some kind of description to the channel types as they are no longer intuitive. Just the fact there is a type for store channels doesn't really tell you anything about it. I don't see how a bot could even use this type apart from being able to see it, they most likely can't send messages there anyway. The documentation should at least somewhat explain how this type works as it currently doesn't really explain anything.

Type Name Description (what I can guess from the name)
0 Guild Text Text Channel used for text messages
1 DM Private Channel used to send messages directly to users
2 Guild Voice Voice Channel for voice interaction
3 Group DM Same as DM but for more people
4 Guild Category Parent of other channels in a guild
5 Guild News It has news?
6 Guild Store Something to do with store (i haven't actually seen one yet)

From the docs I would not be able to tell what the news type is capable of. I only know you can use it like a text channel due to this issue. I don't want to go on a channel type hunt looking for examples of these channels.

It is also not entirely clear how positions behave with the newly added types. Are news channels sorted in the same "bucket" of positions as text channels? What about store channels?

Bastian commented 5 years ago

I'm a little bit disappointed on how less information we got so far. News- and store channels are now out for over two weeks, an we still don't have any answer for a lot of important questions:

Usually we are able to figure most of this out for ourselves, but as these new channels are restricted to verified servers only, we depend on your answers. Not getting an answer for over 2 weeks for simple questions like positioning, is pretty frustrating.

AEnterprise commented 5 years ago

ok i'm not a dev but i can answer the first 2 as i've seen store channels already and my bot is in a few servers that have these features:

it's impossible to send messages to a store channel, it is literally a store page where you buy stuff and nothing else (like if you clicked on something in the nitro tab)

they seem to sort in between normal text channels, not above or below but in between, not 100% sure on that

Kowlin commented 5 years ago

I've got admin access to a server that has a News channel. in terms of positioning they seem to behave like any other channel, Meaning that they follow the same rules as a text channel. The only thing that seems to be different from is the Type ID, like stated in OP's issue.

MinnDevelopment commented 5 years ago

Any update on this? I'm still waiting for docs that could help me write docs/code for our library... It has been almost a month now and I always get told that undocumented is equivalent to unsupported.

yourWaifu commented 5 years ago

I looked at a news message's json and noticed it has a reference_id in their embed. What is this? What does it do?

Jump-Suit commented 5 years ago

This needs to be updated to reflect the Announcement Channel changes!

msciotti commented 5 years ago

Any update on this? I'm still waiting for docs that could help me write docs/code for our library

So I'm poking my head back in here as it's been mostly handled without me, but it seems like some documentation you guys feel is still lacking.

It would be helpful to add some kind of description to the channel types as they are no longer intuitive.

Definitely doable. Can do right now, actually. It seems the questions and whatnot on channel positions have been answered. Aside from adding some descriptions, what else is missing for you guys?

Seklfreak commented 5 years ago

Looks like Bots cannot publish News messages right now? I think that could be useful to add, for automating News channels.

SinisterRectus commented 4 years ago

There is some minutia for channel types that I could not find documented anywhere.

That's all I can think of for now.

justcool393 commented 4 years ago

Looks like Bots cannot publish News messages right now? I think that could be useful to add, for automating News channels.

this would be very very useful. my use case involves pushing announcements from administrators and it is slightly annoying to have to do it manually.

SinisterRectus commented 4 years ago

@justcool393 See #1161 and #1314

justcool393 commented 4 years ago

@justcool393 See #1161 and #1314

@SinisterRectus Well... that sucks. I kinda feel like a lot (maybe even most) of the utility of announcement channels is lost by this decision.