mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Replaced access to .Context with .ctx
This commit is contained in:
@@ -80,9 +80,9 @@ namespace NadekoBot.Modules.Searches
|
||||
{
|
||||
Func<double, double> f = StandardConversions.CelsiusToFahrenheit;
|
||||
|
||||
var tz = Context.Guild is null
|
||||
var tz = ctx.Guild is null
|
||||
? TimeZoneInfo.Utc
|
||||
: _tzSvc.GetTimeZoneOrUtc(Context.Guild.Id);
|
||||
: _tzSvc.GetTimeZoneOrUtc(ctx.Guild.Id);
|
||||
var sunrise = data.Sys.Sunrise.ToUnixTimestamp();
|
||||
var sunset = data.Sys.Sunset.ToUnixTimestamp();
|
||||
sunrise = sunrise.ToOffset(tz.GetUtcOffset(sunrise));
|
||||
@@ -738,7 +738,7 @@ namespace NadekoBot.Modules.Searches
|
||||
if (string.IsNullOrWhiteSpace(query))
|
||||
return;
|
||||
|
||||
await Context.Channel.TriggerTypingAsync().ConfigureAwait(false);
|
||||
await ctx.Channel.TriggerTypingAsync().ConfigureAwait(false);
|
||||
|
||||
var appId = await _service.GetSteamAppIdByName(query).ConfigureAwait(false);
|
||||
if (appId == -1)
|
||||
|
@@ -13,7 +13,7 @@ namespace NadekoBot.Modules.Searches
|
||||
// [RequireContext(ContextType.Guild)]
|
||||
// public async Task YtFollow(string ytChannelId, [Leftover] string uploadMessage = null)
|
||||
// {
|
||||
// var succ = await _service.ToggleChannelFollowAsync(Context.Guild.Id, Context.Channel.Id, ytChannelId, uploadMessage);
|
||||
// var succ = await _service.ToggleChannelFollowAsync(ctx.Guild.Id, ctx.Channel.Id, ytChannelId, uploadMessage);
|
||||
// if(succ)
|
||||
// {
|
||||
// await ReplyConfirmLocalizedAsync("yt_follow_added").ConfigureAwait(false);
|
||||
@@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Searches
|
||||
// [RequireContext(ContextType.Guild)]
|
||||
// public async Task YtTrackRm(int index)
|
||||
// {
|
||||
// //var succ = await _service.ToggleChannelTrackingAsync(Context.Guild.Id, Context.Channel.Id, ytChannelId, uploadMessage);
|
||||
// //var succ = await _service.ToggleChannelTrackingAsync(ctx.Guild.Id, ctx.Channel.Id, ytChannelId, uploadMessage);
|
||||
// //if (succ)
|
||||
// //{
|
||||
// // await ReplyConfirmLocalizedAsync("yt_track_added").ConfigureAwait(false);
|
||||
@@ -43,7 +43,7 @@ namespace NadekoBot.Modules.Searches
|
||||
// [RequireContext(ContextType.Guild)]
|
||||
// public async Task YtTrackList()
|
||||
// {
|
||||
// //var succ = await _service.ToggleChannelTrackingAsync(Context.Guild.Id, Context.Channel.Id, ytChannelId, uploadMessage);
|
||||
// //var succ = await _service.ToggleChannelTrackingAsync(ctx.Guild.Id, ctx.Channel.Id, ytChannelId, uploadMessage);
|
||||
// //if (succ)
|
||||
// //{
|
||||
// // await ReplyConfirmLocalizedAsync("yt_track_added").ConfigureAwait(false);
|
||||
|
Reference in New Issue
Block a user