mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Some refactorings - Updated editorconfig, removed some unused variables and parameters, updated some old thorwaway variable code, some general cleanup
This commit is contained in:
@@ -38,7 +38,7 @@ public partial class Searches
|
||||
|
||||
var rawJson = await res.Content.ReadAsStringAsync();
|
||||
|
||||
var data = JsonConvert.DeserializeObject<List<MemegenTemplate>>(rawJson);
|
||||
var data = JsonConvert.DeserializeObject<List<MemegenTemplate>>(rawJson)!;
|
||||
|
||||
await ctx.SendPaginatedConfirmAsync(page,
|
||||
curPage =>
|
||||
|
@@ -520,16 +520,16 @@ public partial class Searches : NadekoModule<SearchesService>
|
||||
await ctx.SendPaginatedConfirmAsync(0,
|
||||
page =>
|
||||
{
|
||||
var data = col.Skip(page).First();
|
||||
var model = col.Skip(page).First();
|
||||
var embed = _eb.Create()
|
||||
.WithDescription(ctx.User.Mention)
|
||||
.AddField(GetText(strs.word), data.Word, true)
|
||||
.AddField(GetText(strs._class), data.WordType, true)
|
||||
.AddField(GetText(strs.definition), data.Definition)
|
||||
.AddField(GetText(strs.word), model.Word, true)
|
||||
.AddField(GetText(strs._class), model.WordType, true)
|
||||
.AddField(GetText(strs.definition), model.Definition)
|
||||
.WithOkColor();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(data.Example))
|
||||
embed.AddField(GetText(strs.example), data.Example);
|
||||
if (!string.IsNullOrWhiteSpace(model.Example))
|
||||
embed.AddField(GetText(strs.example), model.Example);
|
||||
|
||||
return embed;
|
||||
},
|
||||
|
@@ -229,6 +229,7 @@ public class SearchesService : INService
|
||||
+ $"&by=position"
|
||||
+ $"&lat={geoData.Lat}"
|
||||
+ $"&lng={geoData.Lon}");
|
||||
|
||||
using var geoRes = await http.SendAsync(req);
|
||||
var resString = await geoRes.Content.ReadAsStringAsync();
|
||||
var timeObj = JsonConvert.DeserializeObject<TimeZoneResult>(resString);
|
||||
|
Reference in New Issue
Block a user