Fixed 3 response strings. Fixed ~pokeab rare bug thanks to infy

This commit is contained in:
Kwoth 2017-02-25 03:43:30 +01:00
parent 22f961a093
commit 778dbcb1d0
6 changed files with 29 additions and 13 deletions

View File

@ -82,7 +82,7 @@ namespace NadekoBot.Modules.Games
var prefix = NadekoBot.ModulePrefixes[typeof(Games).Name]; var prefix = NadekoBot.ModulePrefixes[typeof(Games).Name];
var toSend = dropAmount == 1 var toSend = dropAmount == 1
? GetLocalText(channel, "curgen_sn", NadekoBot.BotConfig.CurrencySign, prefix) ? GetLocalText(channel, "curgen_sn", NadekoBot.BotConfig.CurrencySign, prefix)
: GetLocalText(channel, "curgen_pl", NadekoBot.BotConfig.CurrencySign, prefix); : GetLocalText(channel, "curgen_pl", dropAmount, NadekoBot.BotConfig.CurrencySign, prefix);
var file = GetRandomCurrencyImage(); var file = GetRandomCurrencyImage();
using (var fileStream = file.Value.ToStream()) using (var fileStream = file.Value.ToStream())
{ {

View File

@ -915,9 +915,9 @@ namespace NadekoBot.Modules.Music
{ {
IUserMessage msg; IUserMessage msg;
if (paused) if (paused)
msg = await mp.OutputTextChannel.SendConfirmAsync(GetText("music_paused")).ConfigureAwait(false); msg = await mp.OutputTextChannel.SendConfirmAsync(GetText("paused")).ConfigureAwait(false);
else else
msg = await mp.OutputTextChannel.SendConfirmAsync(GetText("music_resumed")).ConfigureAwait(false); msg = await mp.OutputTextChannel.SendConfirmAsync(GetText("resumed")).ConfigureAwait(false);
msg?.DeleteAfter(10); msg?.DeleteAfter(10);
} }

View File

@ -33,22 +33,23 @@ namespace NadekoBot.Modules.Searches.Models
public string[] Evos { get; set; } public string[] Evos { get; set; }
public string[] EggGroups { get; set; } public string[] EggGroups { get; set; }
public override string ToString() => $@"`Name:` {Species} // public override string ToString() => $@"`Name:` {Species}
`Types:` {string.Join(", ", Types)} //`Types:` {string.Join(", ", Types)}
`Stats:` {BaseStats} //`Stats:` {BaseStats}
`Height:` {HeightM,4}m `Weight:` {WeightKg}kg //`Height:` {HeightM,4}m `Weight:` {WeightKg}kg
`Abilities:` {string.Join(", ", Abilities.Values)}"; //`Abilities:` {string.Join(", ", Abilities.Values)}";
} }
public class SearchPokemonAbility public class SearchPokemonAbility
{ {
public string Desc { get; set; } public string Desc { get; set; }
public string ShortDesc { get; set; }
public string Name { get; set; } public string Name { get; set; }
public float Rating { get; set; } public float Rating { get; set; }
public override string ToString() => $@"`Name:` : {Name} // public override string ToString() => $@"`Name:` : {Name}
`Rating:` {Rating} //`Rating:` {Rating}
`Description:` {Desc}"; //`Description:` {Desc}";
} }
} }

View File

@ -77,8 +77,11 @@ namespace NadekoBot.Modules.Searches
{ {
await Context.Channel.EmbedAsync(new EmbedBuilder().WithOkColor() await Context.Channel.EmbedAsync(new EmbedBuilder().WithOkColor()
.WithTitle(kvp.Value.Name) .WithTitle(kvp.Value.Name)
.WithDescription(kvp.Value.Desc) .WithDescription(string.IsNullOrWhiteSpace(kvp.Value.Desc)
.AddField(efb => efb.WithName(GetText("rating")).WithValue(kvp.Value.Rating.ToString(_cultureInfo)).WithIsInline(true)) ? kvp.Value.ShortDesc
: kvp.Value.Desc)
.AddField(efb => efb.WithName(GetText("rating"))
.WithValue(kvp.Value.Rating.ToString(_cultureInfo)).WithIsInline(true))
).ConfigureAwait(false); ).ConfigureAwait(false);
return; return;
} }

View File

@ -2081,6 +2081,15 @@ namespace NadekoBot.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Animal Race is already running..
/// </summary>
public static string gambling_animal_race_already_started {
get {
return ResourceManager.GetString("gambling_animal_race_already_started", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Failed to start since there was not enough participants.. /// Looks up a localized string similar to Failed to start since there was not enough participants..
/// </summary> /// </summary>

View File

@ -1218,6 +1218,9 @@ Don't forget to leave your discord name or id in the message.
<data name="games_submissions_closed" xml:space="preserve"> <data name="games_submissions_closed" xml:space="preserve">
<value>Submissions Closed</value> <value>Submissions Closed</value>
</data> </data>
<data name="gambling_animal_race_already_started" xml:space="preserve">
<value>Animal Race is already running.</value>
</data>
<data name="gambling_total_average" xml:space="preserve"> <data name="gambling_total_average" xml:space="preserve">
<value>Total: {0} Average: {1}</value> <value>Total: {0} Average: {1}</value>
</data> </data>