Browse Source

Add BanAsync extension to IGuildUser

tags/2.0
Christopher F 7 years ago
parent
commit
1905fdec04
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/Discord.Net.Core/Extensions/UserExtensions.cs

+ 3
- 0
src/Discord.Net.Core/Extensions/UserExtensions.cs View File

@@ -46,5 +46,8 @@ namespace Discord
return await (await user.GetOrCreateDMChannelAsync().ConfigureAwait(false)).SendFileAsync(filePath, text, isTTS, embed, options).ConfigureAwait(false);
}
#endif

public static Task BanAsync(this IGuildUser user, int pruneDays = 0, string reason = null, RequestOptions options = null)
=> user.Guild.AddBanAsync(user, pruneDays, reason, options);
}
}

Loading…
Cancel
Save