-
-
Notifications
You must be signed in to change notification settings - Fork 741
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
Add ability to specify parameters on channel creation #1020
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#pragma warning disable CS1591 | ||
#pragma warning disable CS1591 | ||
using Newtonsoft.Json; | ||
|
||
namespace Discord.API.Rest | ||
|
@@ -10,9 +10,20 @@ internal class CreateGuildChannelParams | |
public string Name { get; } | ||
[JsonProperty("type")] | ||
public ChannelType Type { get; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field's actually optional.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I left that how I found it. |
||
[JsonProperty("parent_id")] | ||
public Optional<ulong?> CategoryId { get; set; } | ||
|
||
//Text channels | ||
[JsonProperty("topic")] | ||
public Optional<string> Topic { get; set; } | ||
[JsonProperty("nsfw")] | ||
public Optional<bool> IsNsfw { get; set; } | ||
|
||
//Voice channels | ||
[JsonProperty("bitrate")] | ||
public Optional<int> Bitrate { get; set; } | ||
[JsonProperty("user_limit")] | ||
public Optional<int?> UserLimit { get; set; } | ||
|
||
public CreateGuildChannelParams(string name, ChannelType type) | ||
{ | ||
|
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.
I really don't think having the action being the last parameter is worth avoiding making a breaking change. Just way too inconsistent.
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.
yeah, this should go before RequestOptions for sure.