mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Merge branch 'v3' of https://gitlab.com/kwoth/nadekobot into v3
This commit is contained in:
@@ -247,20 +247,20 @@ namespace NadekoBot.Modules.Gambling
|
|||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
[Priority(0)]
|
[Priority(0)]
|
||||||
public Task Award(ShmartNumber amount, IGuildUser usr, [Leftover] string msg) =>
|
public Task Award(long amount, IGuildUser usr, [Leftover] string msg) =>
|
||||||
Award(amount, usr.Id, msg);
|
Award(amount, usr.Id, msg);
|
||||||
|
|
||||||
[NadekoCommand, Aliases]
|
[NadekoCommand, Aliases]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
[Priority(1)]
|
[Priority(1)]
|
||||||
public Task Award(ShmartNumber amount, [Leftover] IGuildUser usr) =>
|
public Task Award(long amount, [Leftover] IGuildUser usr) =>
|
||||||
Award(amount, usr.Id);
|
Award(amount, usr.Id);
|
||||||
|
|
||||||
[NadekoCommand, Aliases]
|
[NadekoCommand, Aliases]
|
||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
[Priority(2)]
|
[Priority(2)]
|
||||||
public async Task Award(ShmartNumber amount, ulong usrId, [Leftover] string msg = null)
|
public async Task Award(long amount, ulong usrId, [Leftover] string msg = null)
|
||||||
{
|
{
|
||||||
if (amount <= 0)
|
if (amount <= 0)
|
||||||
return;
|
return;
|
||||||
@@ -276,7 +276,7 @@ namespace NadekoBot.Modules.Gambling
|
|||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
[Priority(2)]
|
[Priority(2)]
|
||||||
public async Task Award(ShmartNumber amount, [Leftover] IRole role)
|
public async Task Award(long amount, [Leftover] IRole role)
|
||||||
{
|
{
|
||||||
var users = (await ctx.Guild.GetUsersAsync().ConfigureAwait(false))
|
var users = (await ctx.Guild.GetUsersAsync().ConfigureAwait(false))
|
||||||
.Where(u => u.GetRoles().Contains(role))
|
.Where(u => u.GetRoles().Contains(role))
|
||||||
@@ -284,7 +284,7 @@ namespace NadekoBot.Modules.Gambling
|
|||||||
|
|
||||||
await _cs.AddBulkAsync(users.Select(x => x.Id),
|
await _cs.AddBulkAsync(users.Select(x => x.Id),
|
||||||
users.Select(x => $"Awarded by bot owner to **{role.Name}** role. ({ctx.User.Username}/{ctx.User.Id})"),
|
users.Select(x => $"Awarded by bot owner to **{role.Name}** role. ({ctx.User.Username}/{ctx.User.Id})"),
|
||||||
users.Select(x => amount.Value),
|
users.Select(x => amount),
|
||||||
gamble: true)
|
gamble: true)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
@@ -298,13 +298,13 @@ namespace NadekoBot.Modules.Gambling
|
|||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
[Priority(0)]
|
[Priority(0)]
|
||||||
public async Task Take(ShmartNumber amount, [Leftover] IRole role)
|
public async Task Take(long amount, [Leftover] IRole role)
|
||||||
{
|
{
|
||||||
var users = (await role.GetMembersAsync()).ToList();
|
var users = (await role.GetMembersAsync()).ToList();
|
||||||
|
|
||||||
await _cs.RemoveBulkAsync(users.Select(x => x.Id),
|
await _cs.RemoveBulkAsync(users.Select(x => x.Id),
|
||||||
users.Select(x => $"Taken by bot owner from **{role.Name}** role. ({ctx.User.Username}/{ctx.User.Id})"),
|
users.Select(x => $"Taken by bot owner from **{role.Name}** role. ({ctx.User.Username}/{ctx.User.Id})"),
|
||||||
users.Select(x => amount.Value),
|
users.Select(x => amount),
|
||||||
gamble: true)
|
gamble: true)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
@@ -318,7 +318,7 @@ namespace NadekoBot.Modules.Gambling
|
|||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
[Priority(1)]
|
[Priority(1)]
|
||||||
public async Task Take(ShmartNumber amount, [Leftover] IGuildUser user)
|
public async Task Take(long amount, [Leftover] IGuildUser user)
|
||||||
{
|
{
|
||||||
if (amount <= 0)
|
if (amount <= 0)
|
||||||
return;
|
return;
|
||||||
@@ -333,7 +333,7 @@ namespace NadekoBot.Modules.Gambling
|
|||||||
|
|
||||||
[NadekoCommand, Aliases]
|
[NadekoCommand, Aliases]
|
||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
public async Task Take(ShmartNumber amount, [Leftover] ulong usrId)
|
public async Task Take(long amount, [Leftover] ulong usrId)
|
||||||
{
|
{
|
||||||
if (amount <= 0)
|
if (amount <= 0)
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user