Fixed raffle
This commit is contained in:
@@ -30,7 +30,7 @@ namespace NadekoBot.Modules.Administration
|
||||
{
|
||||
var channel = imsg.Channel as ITextChannel;
|
||||
|
||||
if (channel == null || await imsg.IsAuthor(_client))
|
||||
if (channel == null || await imsg.IsAuthor())
|
||||
return;
|
||||
ConcurrentDictionary<ulong, DateTime> userTimePair;
|
||||
if (!RatelimitingChannels.TryGetValue(channel.Id, out userTimePair)) return;
|
||||
|
@@ -196,7 +196,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
|
||||
private async Task Client_MessageReceived(IMessage imsg)
|
||||
{
|
||||
if (await imsg.IsAuthor(NadekoBot.Client) || !(imsg.Channel is ITextChannel) || imsg.Channel != raceChannel)
|
||||
if (await imsg.IsAuthor() || !(imsg.Channel is ITextChannel) || imsg.Channel != raceChannel)
|
||||
return;
|
||||
messagesSinceGameStarted++;
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
|
||||
role = role ?? channel.Guild.EveryoneRole;
|
||||
|
||||
var members = (await role.Members()).Where(u => u.Status == UserStatus.Online);
|
||||
var members = role.Members().Where(u => u.Status == UserStatus.Online);
|
||||
var membersArray = members as IUser[] ?? members.ToArray();
|
||||
var usr = membersArray[new Random().Next(0, membersArray.Length)];
|
||||
await channel.SendMessageAsync($"**Raffled user:** {usr.Username} (id: {usr.Id})").ConfigureAwait(false);
|
||||
|
Reference in New Issue
Block a user