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();
|
punishment = "🔇 " + logChannel.Guild.GetLogText("muted_pl").ToUpperInvariant();
|
||||||
break;
|
break;
|
||||||
case PunishmentAction.Kick:
|
case PunishmentAction.Kick:
|
||||||
|
punishment = "👢 " + logChannel.Guild.GetLogText("kicked_pl").ToUpperInvariant();
|
||||||
|
break;
|
||||||
|
case PunishmentAction.Softban:
|
||||||
punishment = "☣ " + logChannel.Guild.GetLogText("soft_banned_pl").ToUpperInvariant();
|
punishment = "☣ " + logChannel.Guild.GetLogText("soft_banned_pl").ToUpperInvariant();
|
||||||
break;
|
break;
|
||||||
case PunishmentAction.Ban:
|
case PunishmentAction.Ban:
|
||||||
|
@ -188,6 +188,13 @@ namespace NadekoBot.Modules.Administration
|
|||||||
catch (Exception ex) { _log.Warn(ex, "I can't apply punishement"); }
|
catch (Exception ex) { _log.Warn(ex, "I can't apply punishement"); }
|
||||||
break;
|
break;
|
||||||
case PunishmentAction.Kick:
|
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
|
try
|
||||||
{
|
{
|
||||||
await gu.Guild.AddBanAsync(gu, 7).ConfigureAwait(false);
|
await gu.Guild.AddBanAsync(gu, 7).ConfigureAwait(false);
|
||||||
|
@ -72,6 +72,17 @@ namespace NadekoBot.Modules.Administration
|
|||||||
case PunishmentAction.Ban:
|
case PunishmentAction.Ban:
|
||||||
await guild.AddBanAsync(user).ConfigureAwait(false);
|
await guild.AddBanAsync(user).ConfigureAwait(false);
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to User kicked.
|
/// Looks up a localized string similar to User kicked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -1504,7 +1513,7 @@ namespace NadekoBot.Resources {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to soft-banned (kicked).
|
/// Looks up a localized string similar to soft-banned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string administration_soft_banned_pl {
|
public static string administration_soft_banned_pl {
|
||||||
get {
|
get {
|
||||||
|
@ -740,7 +740,7 @@ Reason: {1}</value>
|
|||||||
<value>Slow mode initiated</value>
|
<value>Slow mode initiated</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="administration_soft_banned_pl" xml:space="preserve">
|
<data name="administration_soft_banned_pl" xml:space="preserve">
|
||||||
<value>soft-banned (kicked)</value>
|
<value>soft-banned</value>
|
||||||
<comment>PLURAL</comment>
|
<comment>PLURAL</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="administration_spam_ignore" xml:space="preserve">
|
<data name="administration_spam_ignore" xml:space="preserve">
|
||||||
@ -2284,6 +2284,10 @@ Owner ID: {2}</value>
|
|||||||
<data name="administration_command_text" xml:space="preserve">
|
<data name="administration_command_text" xml:space="preserve">
|
||||||
<value>Command Text</value>
|
<value>Command Text</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="administration_kicked_pl" xml:space="preserve">
|
||||||
|
<value>Kicked</value>
|
||||||
|
<comment>PLURAL</comment>
|
||||||
|
</data>
|
||||||
<data name="administration_moderator" xml:space="preserve">
|
<data name="administration_moderator" xml:space="preserve">
|
||||||
<value>Moderator</value>
|
<value>Moderator</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -31,6 +31,7 @@ namespace NadekoBot.Services.Database.Models
|
|||||||
Mute,
|
Mute,
|
||||||
Kick,
|
Kick,
|
||||||
Ban,
|
Ban,
|
||||||
|
Softban
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AntiSpamIgnore : DbEntity
|
public class AntiSpamIgnore : DbEntity
|
||||||
|
Loading…
Reference in New Issue
Block a user