Fix message sent when user is trying give themselves !neutral karma

This commit is contained in:
Daan Boerlage 2021-03-18 12:27:26 +01:00
parent 6c142f41d3
commit c77b501b6c
Signed by: daan
GPG key ID: FCE070E1E4956606
4 changed files with 16 additions and 1 deletions

View file

@ -125,7 +125,7 @@ namespace Geekbot.Bot.Commands.User
var actor = await GetUser(Context.User.Id); var actor = await GetUser(Context.User.Id);
if (user.Id == Context.User.Id) if (user.Id == Context.User.Id)
{ {
await ReplyAsync(string.Format(Localization.Karma.CannotChangeOwnDown, Context.User.Username)); await ReplyAsync(string.Format(Localization.Karma.CannotChangeOwnSame, Context.User.Username));
return; return;
} }

View file

@ -87,6 +87,15 @@ namespace Geekbot.Bot.Localization {
} }
} }
/// <summary>
/// Looks up a localized string similar to Sorry {0}, but you can&apos;t give yourself neutral karma.
/// </summary>
internal static string CannotChangeOwnSame {
get {
return ResourceManager.GetString("CannotChangeOwnSame", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Sorry {0}, but you can&apos;t give yourself karma. /// Looks up a localized string similar to Sorry {0}, but you can&apos;t give yourself karma.
/// </summary> /// </summary>

View file

@ -38,4 +38,7 @@
<data name="Neutral" xml:space="preserve"> <data name="Neutral" xml:space="preserve">
<value>Neutral Karma</value> <value>Neutral Karma</value>
</data> </data>
<data name="CannotChangeOwnSame" xml:space="preserve">
<value>Sorry {0}, aber du chasch dr selber kei neutrals karma geh</value>
</data>
</root> </root>

View file

@ -45,4 +45,7 @@
<data name="Neutral" xml:space="preserve"> <data name="Neutral" xml:space="preserve">
<value>Neutral Karma</value> <value>Neutral Karma</value>
</data> </data>
<data name="CannotChangeOwnSame" xml:space="preserve">
<value>Sorry {0}, but you can't give yourself neutral karma</value>
</data>
</root> </root>