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

Implement basic support for GUILD_MEDIA channels. #109

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public override string ToString()
case ChannelType.Stage:
case ChannelType.Directory:
case ChannelType.Forum:
case ChannelType.Media:
return TransientGuildChannel.Create(client, model);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public new static TransientGuildChannel Create(IClient client, ChannelJsonModel
return new TransientStageChannel(client, model);

case ChannelType.Forum:
case ChannelType.Media:
return new TransientForumChannel(client, model);
}

Expand Down
6 changes: 4 additions & 2 deletions src/Disqord.Core/Enums/ChannelType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ public enum ChannelType : byte

Directory = 14,

Forum = 15
}
Forum = 15,

Media = 16
}
7 changes: 6 additions & 1 deletion src/Disqord.Core/Enums/GuildChannelFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ public enum GuildChannelFlags
/// <summary>
/// The forum channel requires a tag to be specified for threads created in it.
/// </summary>
RequiresTag = 1 << 4
RequiresTag = 1 << 4,

/// <summary>
/// The media channel hides the embedded media download options for media in the threads created in it.
/// </summary>
HideMediaDownloadOptions = 1 << 15
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public static CachedGuildChannel Create(IGatewayClient client, ChannelJsonModel
return new CachedStageChannel(client, model);

case ChannelType.Forum:
case ChannelType.Media:
return new CachedForumChannel(client, model);
}

Expand Down
Loading