Fixed raffle

This commit is contained in:
Kwoth
2016-08-21 03:35:28 +02:00
parent e7b6f110a3
commit 57a2caef84
4 changed files with 7 additions and 7 deletions

View File

@@ -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;

View File

@@ -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++;
}

View File

@@ -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);