Upgrade to discord.net 2.0
This commit is contained in:
parent
acb2b25e09
commit
4e4ef3584e
12 changed files with 35 additions and 20 deletions
|
@ -7,6 +7,7 @@ using Discord.Commands;
|
|||
using Discord.WebSocket;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
|
||||
namespace Geekbot.net.Commands.Utils
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ using Discord;
|
|||
using Discord.Commands;
|
||||
using Geekbot.net.Lib.Converters;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
using Geekbot.net.Lib.UserRepository;
|
||||
using Newtonsoft.Json;
|
||||
using StackExchange.Redis;
|
||||
|
|
|
@ -187,12 +187,11 @@ namespace Geekbot.net.Commands.Utils.Quote
|
|||
try
|
||||
{
|
||||
var list = Context.Channel.GetMessagesAsync().Flatten();
|
||||
await list;
|
||||
return list.Result
|
||||
.First(msg => msg.Author.Id == user.Id
|
||||
&& msg.Embeds.Count == 0
|
||||
&& msg.Id != Context.Message.Id
|
||||
&& !msg.Content.ToLower().StartsWith("!"));
|
||||
return await list.FirstOrDefault(msg =>
|
||||
msg.Author.Id == user.Id &&
|
||||
msg.Embeds.Count == 0 &&
|
||||
msg.Id != Context.Message.Id &&
|
||||
!msg.Content.ToLower().StartsWith("!"));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue