softban is a separate punishment from kick now. Commandlist updated

This commit is contained in:
Kwoth
2017-04-01 11:15:37 +02:00
parent 0a7bbd60f7
commit 223b668628
6 changed files with 37 additions and 2 deletions

View File

@@ -307,6 +307,9 @@ namespace NadekoBot.Modules.Administration
punishment = "🔇 " + logChannel.Guild.GetLogText("muted_pl").ToUpperInvariant();
break;
case PunishmentAction.Kick:
punishment = "👢 " + logChannel.Guild.GetLogText("kicked_pl").ToUpperInvariant();
break;
case PunishmentAction.Softban:
punishment = "☣ " + logChannel.Guild.GetLogText("soft_banned_pl").ToUpperInvariant();
break;
case PunishmentAction.Ban:

View File

@@ -188,6 +188,13 @@ namespace NadekoBot.Modules.Administration
catch (Exception ex) { _log.Warn(ex, "I can't apply punishement"); }
break;
case PunishmentAction.Kick:
try
{
await gu.KickAsync().ConfigureAwait(false);
}
catch (Exception ex) { _log.Warn(ex, "I can't apply punishement"); }
break;
case PunishmentAction.Softban:
try
{
await gu.Guild.AddBanAsync(gu, 7).ConfigureAwait(false);

View File

@@ -72,6 +72,17 @@ namespace NadekoBot.Modules.Administration
case PunishmentAction.Ban:
await guild.AddBanAsync(user).ConfigureAwait(false);
break;
case PunishmentAction.Softban:
await guild.AddBanAsync(user).ConfigureAwait(false);
try
{
await guild.RemoveBanAsync(user).ConfigureAwait(false);
}
catch
{
await guild.RemoveBanAsync(user).ConfigureAwait(false);
}
break;
default:
break;
}