Skip to content

Commit 1c978d7

Browse files
authored
Add parent_id to the CreateGuildChannel method (#11)
* ✨ add parent_id in CreateGuildChannel method
1 parent 8c11690 commit 1c978d7

File tree

1 file changed

+4
-3
lines changed
  • Oxide.Ext.Discord/DiscordObjects

1 file changed

+4
-3
lines changed

Oxide.Ext.Discord/DiscordObjects/Guild.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,18 @@ public void GetGuildChannels(DiscordClient client, Action<List<Channel>> callbac
127127
client.REST.DoRequest($"/guilds/{id}/channels", RequestMethod.GET, null, callback);
128128
}
129129

130-
public void CreateGuildChannel(DiscordClient client, Channel channel, Action<Channel> callback = null) => CreateGuildChannel(client, channel.name, channel.type, channel.bitrate, channel.user_limit, channel.permission_overwrites, callback);
130+
public void CreateGuildChannel(DiscordClient client, Channel channel, Action<Channel> callback = null) => CreateGuildChannel(client, channel.name, channel.type, channel.bitrate, channel.user_limit, channel.permission_overwrites, channel.parent_id, callback);
131131

132-
public void CreateGuildChannel(DiscordClient client, string name, ChannelType? type, int? bitrate, int? userLimit, List<Overwrite> permissionOverwrites, Action<Channel> callback = null)
132+
public void CreateGuildChannel(DiscordClient client, string name, ChannelType? type, int? bitrate, int? userLimit, List<Overwrite> permissionOverwrites, string parent_id, Action<Channel> callback = null)
133133
{
134134
var jsonObj = new Dictionary<string, object>()
135135
{
136136
{ "name", name },
137137
{ "type", type },
138138
{ "bitrate", bitrate },
139139
{ "user_limit", userLimit },
140-
{ "permission_overwrites", permissionOverwrites }
140+
{ "permission_overwrites", permissionOverwrites },
141+
{ "parent_id", parent_id }
141142
};
142143

143144
client.REST.DoRequest($"/guilds/{id}/channels", RequestMethod.POST, jsonObj, callback);

0 commit comments

Comments
 (0)