softban is a separate punishment from kick now. Commandlist updated
This commit is contained in:
parent
0a7bbd60f7
commit
223b668628
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
11
src/NadekoBot/Resources/ResponseStrings.Designer.cs
generated
11
src/NadekoBot/Resources/ResponseStrings.Designer.cs
generated
@ -574,6 +574,15 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Kicked.
|
||||
/// </summary>
|
||||
public static string administration_kicked_pl {
|
||||
get {
|
||||
return ResourceManager.GetString("administration_kicked_pl", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User kicked.
|
||||
/// </summary>
|
||||
@ -1504,7 +1513,7 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to soft-banned (kicked).
|
||||
/// Looks up a localized string similar to soft-banned.
|
||||
/// </summary>
|
||||
public static string administration_soft_banned_pl {
|
||||
get {
|
||||
|
@ -740,7 +740,7 @@ Reason: {1}</value>
|
||||
<value>Slow mode initiated</value>
|
||||
</data>
|
||||
<data name="administration_soft_banned_pl" xml:space="preserve">
|
||||
<value>soft-banned (kicked)</value>
|
||||
<value>soft-banned</value>
|
||||
<comment>PLURAL</comment>
|
||||
</data>
|
||||
<data name="administration_spam_ignore" xml:space="preserve">
|
||||
@ -2284,6 +2284,10 @@ Owner ID: {2}</value>
|
||||
<data name="administration_command_text" xml:space="preserve">
|
||||
<value>Command Text</value>
|
||||
</data>
|
||||
<data name="administration_kicked_pl" xml:space="preserve">
|
||||
<value>Kicked</value>
|
||||
<comment>PLURAL</comment>
|
||||
</data>
|
||||
<data name="administration_moderator" xml:space="preserve">
|
||||
<value>Moderator</value>
|
||||
</data>
|
||||
|
@ -31,6 +31,7 @@ namespace NadekoBot.Services.Database.Models
|
||||
Mute,
|
||||
Kick,
|
||||
Ban,
|
||||
Softban
|
||||
}
|
||||
|
||||
public class AntiSpamIgnore : DbEntity
|
||||
|
Loading…
Reference in New Issue
Block a user