コード例 #1
0
 /// <summary>
 /// Bans this user from the guild they are a member of.
 /// <para>Requires <see cref="DiscordPermission.BanMembers"/>.</para>
 /// </summary>
 /// <param name="deleteMessageDays">Number of days to delete messages for (0-7) or null to delete none.</param>
 /// <exception cref="DiscordHttpApiException"></exception>
 public Task Ban(int?deleteMessageDays = null)
 {
     return(http.CreateGuildBan(GuildId, Id, deleteMessageDays));
 }
コード例 #2
0
 /// <summary>
 /// Bans the specified user from this guild.
 /// <para>Requires <see cref="DiscordPermission.BanMembers"/>.</para>
 /// </summary>
 /// <param name="deleteMessageDays">Number of days to delete messages for (0-7) or null to delete none.</param>
 /// <exception cref="DiscordHttpApiException"></exception>
 public Task CreateBan(Snowflake userId, int?deleteMessageDays = null)
 {
     return(http.CreateGuildBan(Id, userId, deleteMessageDays));
 }