Browse Source

Fixed ModifyAsync null checks

pull/108/head
RogueException 9 years ago
parent
commit
4f1623d5e9
4 changed files with 4 additions and 4 deletions
  1. +1
    -1
      src/Discord.Net/Entities/Channels/GuildChannel.cs
  2. +1
    -1
      src/Discord.Net/Entities/Channels/TextChannel.cs
  3. +1
    -1
      src/Discord.Net/Entities/Channels/VoiceChannel.cs
  4. +1
    -1
      src/Discord.Net/Entities/Users/SelfUser.cs

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

@@ -51,7 +51,7 @@ namespace Discord
}
public async Task ModifyAsync(Action<ModifyGuildChannelParams> func)
{
if (func != null) throw new NullReferenceException(nameof(func));
if (func == null) throw new NullReferenceException(nameof(func));

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


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

@@ -32,7 +32,7 @@ namespace Discord

public async Task ModifyAsync(Action<ModifyTextChannelParams> func)
{
if (func != null) throw new NullReferenceException(nameof(func));
if (func == null) throw new NullReferenceException(nameof(func));

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


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

@@ -28,7 +28,7 @@ namespace Discord
public async Task ModifyAsync(Action<ModifyVoiceChannelParams> func)
{
if (func != null) throw new NullReferenceException(nameof(func));
if (func == null) throw new NullReferenceException(nameof(func));

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


+ 1
- 1
src/Discord.Net/Entities/Users/SelfUser.cs View File

@@ -33,7 +33,7 @@ namespace Discord
}
public async Task ModifyAsync(Action<ModifyCurrentUserParams> func)
{
if (func != null) throw new NullReferenceException(nameof(func));
if (func == null) throw new NullReferenceException(nameof(func));

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


Loading…
Cancel
Save