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:
@@ -516,7 +516,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
|
||||
List<DiscordUser> cleanRichest = new List<DiscordUser>();
|
||||
// it's pointless to have clean on dm context
|
||||
if (Context.Guild is null)
|
||||
if (ctx.Guild is null)
|
||||
{
|
||||
opts.Clean = false;
|
||||
}
|
||||
@@ -530,10 +530,10 @@ namespace NadekoBot.Modules.Gambling
|
||||
cleanRichest = uow.DiscordUser.GetTopRichest(_client.CurrentUser.Id, 10_000);
|
||||
}
|
||||
|
||||
await Context.Channel.TriggerTypingAsync().ConfigureAwait(false);
|
||||
await ctx.Channel.TriggerTypingAsync().ConfigureAwait(false);
|
||||
await _tracker.EnsureUsersDownloadedAsync(ctx.Guild).ConfigureAwait(false);
|
||||
|
||||
var sg = (SocketGuild)Context.Guild;
|
||||
var sg = (SocketGuild)ctx.Guild;
|
||||
cleanRichest = cleanRichest.Where(x => sg.GetUser(x.UserId) != null)
|
||||
.ToList();
|
||||
}
|
||||
@@ -545,7 +545,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
}
|
||||
}
|
||||
|
||||
await Context.SendPaginatedConfirmAsync(page, curPage =>
|
||||
await ctx.SendPaginatedConfirmAsync(page, curPage =>
|
||||
{
|
||||
var embed = _eb.Create()
|
||||
.WithOkColor()
|
||||
|
@@ -356,7 +356,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
if (--index < 0 || price <= 0)
|
||||
return;
|
||||
|
||||
var succ = await _service.ChangeEntryPriceAsync(Context.Guild.Id, index, price);
|
||||
var succ = await _service.ChangeEntryPriceAsync(ctx.Guild.Id, index, price);
|
||||
if (succ)
|
||||
{
|
||||
await ShopInternalAsync(index / 9);
|
||||
@@ -376,7 +376,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
if (--index < 0 || string.IsNullOrWhiteSpace(newName))
|
||||
return;
|
||||
|
||||
var succ = await _service.ChangeEntryNameAsync(Context.Guild.Id, index, newName);
|
||||
var succ = await _service.ChangeEntryNameAsync(ctx.Guild.Id, index, newName);
|
||||
if (succ)
|
||||
{
|
||||
await ShopInternalAsync(index / 9);
|
||||
@@ -396,7 +396,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
if (--index1 < 0 || --index2 < 0 || index1 == index2)
|
||||
return;
|
||||
|
||||
var succ = await _service.SwapEntriesAsync(Context.Guild.Id, index1, index2);
|
||||
var succ = await _service.SwapEntriesAsync(ctx.Guild.Id, index1, index2);
|
||||
if (succ)
|
||||
{
|
||||
await ShopInternalAsync(index1 / 9);
|
||||
@@ -416,7 +416,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
if (--fromIndex < 0 || --toIndex < 0 || fromIndex == toIndex)
|
||||
return;
|
||||
|
||||
var succ = await _service.MoveEntryAsync(Context.Guild.Id, fromIndex, toIndex);
|
||||
var succ = await _service.MoveEntryAsync(ctx.Guild.Id, fromIndex, toIndex);
|
||||
if (succ)
|
||||
{
|
||||
await ShopInternalAsync(toIndex / 9);
|
||||
|
Reference in New Issue
Block a user