This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
youys
/
Discord.Net
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
34
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
add News channel type
pull/1293/head
Chris Johnston
6 years ago
parent
db50badcc4
commit
0312699903
4 changed files
with
10 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-1
src/Discord.Net.Core/Entities/Channels/ChannelType.cs
+1
-0
src/Discord.Net.Rest/Entities/Channels/RestChannel.cs
+3
-0
src/Discord.Net.Rest/Entities/Channels/RestGuildChannel.cs
+3
-0
src/Discord.Net.WebSocket/Entities/Channels/SocketGuildChannel.cs
+ 3
- 1
src/Discord.Net.Core/Entities/Channels/ChannelType.cs
View File
@@ -12,6 +12,8 @@ namespace Discord
/// <summary> The channel is a group channel. </summary>
Group = 3,
/// <summary> The channel is a category channel. </summary>
Category = 4
Category = 4,
/// <summary> The channel is a news channel. </summary>
News = 5
}
}
+ 1
- 0
src/Discord.Net.Rest/Entities/Channels/RestChannel.cs
View File
@@ -23,6 +23,7 @@ namespace Discord.Rest
{
switch (model.Type)
{
case ChannelType.News:
case ChannelType.Text:
case ChannelType.Voice:
return RestGuildChannel.Create(discord, new RestGuild(discord, model.GuildId.Value), model);
+ 3
- 0
src/Discord.Net.Rest/Entities/Channels/RestGuildChannel.cs
View File
@@ -34,6 +34,9 @@ namespace Discord.Rest
{
switch (model.Type)
{
case ChannelType.News:
// TODO: create new RestNewsChannel
throw new NotImplementedException();
case ChannelType.Text:
return RestTextChannel.Create(discord, guild, model);
case ChannelType.Voice:
+ 3
- 0
src/Discord.Net.WebSocket/Entities/Channels/SocketGuildChannel.cs
View File
@@ -48,6 +48,9 @@ namespace Discord.WebSocket
{
switch (model.Type)
{
case ChannelType.News:
// TODO: create new SocketNewsChannel
throw new NotImplementedException();
case ChannelType.Text:
return SocketTextChannel.Create(guild, state, model);
case ChannelType.Voice:
Write
Preview
Loading…
Cancel
Save