Browse Source

Merge pull request #126 from RogueException/khionu-bugfix1

Supply current GuildChannel Name if not specified
pull/140/head
RogueException GitHub 9 years ago
parent
commit
e1de348489
3 changed files with 12 additions and 0 deletions
  1. +4
    -0
      src/Discord.Net/Entities/Channels/GuildChannel.cs
  2. +4
    -0
      src/Discord.Net/Entities/Channels/TextChannel.cs
  3. +4
    -0
      src/Discord.Net/Entities/Channels/VoiceChannel.cs

+ 4
- 0
src/Discord.Net/Entities/Channels/GuildChannel.cs View File

@@ -55,6 +55,10 @@ namespace Discord

var args = new ModifyGuildChannelParams();
func(args);

if (!args.Name.IsSpecified)
args.Name = Name;

var model = await Discord.ApiClient.ModifyGuildChannelAsync(Id, args).ConfigureAwait(false);
Update(model, UpdateSource.Rest);
}


+ 4
- 0
src/Discord.Net/Entities/Channels/TextChannel.cs View File

@@ -36,6 +36,10 @@ namespace Discord

var args = new ModifyTextChannelParams();
func(args);

if (!args.Name.IsSpecified)
args.Name = Name;

var model = await Discord.ApiClient.ModifyGuildChannelAsync(Id, args).ConfigureAwait(false);
Update(model, UpdateSource.Rest);
}


+ 4
- 0
src/Discord.Net/Entities/Channels/VoiceChannel.cs View File

@@ -33,6 +33,10 @@ namespace Discord

var args = new ModifyVoiceChannelParams();
func(args);

if (!args.Name.IsSpecified)
args.Name = Name;

var model = await Discord.ApiClient.ModifyGuildChannelAsync(Id, args).ConfigureAwait(false);
Update(model, UpdateSource.Rest);
}


Loading…
Cancel
Save