Added .raffleany - it will include users who are not online, too
This commit is contained in:
		@@ -107,6 +107,22 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
            await Context.Channel.SendConfirmAsync("🎟 "+ GetText("raffled_user"), $"**{usr.Username}#{usr.Discriminator}**", footer: $"ID: {usr.Id}").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task RaffleAny([Remainder] IRole role = null)
 | 
			
		||||
        {
 | 
			
		||||
            role = role ?? Context.Guild.EveryoneRole;
 | 
			
		||||
 | 
			
		||||
            var members = (await role.GetMembersAsync());
 | 
			
		||||
            var membersArray = members as IUser[] ?? members.ToArray();
 | 
			
		||||
            if (membersArray.Length == 0)
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            var usr = membersArray[new NadekoRandom().Next(0, membersArray.Length)];
 | 
			
		||||
            await Context.Channel.SendConfirmAsync("🎟 " + GetText("raffled_user"), $"**{usr.Username}#{usr.Discriminator}**", footer: $"ID: {usr.Id}").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [Priority(1)]
 | 
			
		||||
        public async Task Cash([Remainder] IUser user = null)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user