Improved plant/pick stuff, ~ow fixed
This commit is contained in:
parent
ba19524245
commit
e4a62c4d5e
@ -162,9 +162,9 @@ namespace NadekoBot.Modules.Games
|
||||
Prefix);
|
||||
|
||||
if (amount > 1)
|
||||
msgToSend += GetText("pick_pl", Prefix);
|
||||
msgToSend += " " + GetText("pick_pl", Prefix);
|
||||
else
|
||||
msgToSend += GetText("pick_sn", Prefix);
|
||||
msgToSend += " " + GetText("pick_sn", Prefix);
|
||||
|
||||
IUserMessage msg;
|
||||
using (var toSend = imgData.Value.ToStream())
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Discord;
|
||||
using System;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using NadekoBot.Attributes;
|
||||
using NadekoBot.Extensions;
|
||||
@ -20,7 +21,7 @@ namespace NadekoBot.Modules.Searches
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(query))
|
||||
return;
|
||||
var battletag = Regex.Replace(query, "#", "-");
|
||||
var battletag = query.Replace("#", "-");
|
||||
|
||||
await Context.Channel.TriggerTypingAsync().ConfigureAwait(false);
|
||||
try
|
||||
@ -73,15 +74,22 @@ namespace NadekoBot.Modules.Searches
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var http = new HttpClient())
|
||||
using (var handler = new HttpClientHandler())
|
||||
{
|
||||
var url = await http.GetStringAsync($"https://api.lootbox.eu/pc/{region.ToLower()}/{battletag}/profile");
|
||||
handler.ServerCertificateCustomValidationCallback = (x, y, z, e) => true;
|
||||
using (var http = new HttpClient(handler))
|
||||
{
|
||||
var url =
|
||||
await http.GetStringAsync(
|
||||
$"https://api.lootbox.eu/pc/{region.ToLower()}/{battletag}/profile");
|
||||
var model = JsonConvert.DeserializeObject<OverwatchApiModel.OverwatchPlayer>(url);
|
||||
return model.data;
|
||||
}
|
||||
}
|
||||
catch
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log.Warn(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -1235,13 +1235,6 @@ Don't forget to leave your discord name or id in the message.
|
||||
<data name="games_curgen_enabled" xml:space="preserve">
|
||||
<value>Currency generation has been enabled on this channel.</value>
|
||||
</data>
|
||||
<data name="games_curgen_pl" xml:space="preserve">
|
||||
<value>{0} random {1} appeared! Pick them up by typing `{2}pick`</value>
|
||||
<comment>plural</comment>
|
||||
</data>
|
||||
<data name="games_curgen_sn" xml:space="preserve">
|
||||
<value>A random {0} appeared! Pick it up by typing `{1}pick`</value>
|
||||
</data>
|
||||
<data name="games_failed_loading_question" xml:space="preserve">
|
||||
<value>Failed loading a question.</value>
|
||||
</data>
|
||||
@ -2219,6 +2212,16 @@ Owner ID: {2}</value>
|
||||
<value>{0} total votes cast.</value>
|
||||
</data>
|
||||
<data name="gambling_page" xml:space="preserve">
|
||||
<value>Page #{0}</value>
|
||||
<value>page {0}</value>
|
||||
</data>
|
||||
<data name="gambling_no_users_found" xml:space="preserve">
|
||||
<value>No users found.</value>
|
||||
</data>
|
||||
<data name="games_curgen_pl" xml:space="preserve">
|
||||
<value>{0} random {1} appeared!</value>
|
||||
<comment>plural</comment>
|
||||
</data>
|
||||
<data name="games_curgen_sn" xml:space="preserve">
|
||||
<value>A random {0} appeared!</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user