Upgrade to discord.net 2.0-beta
This commit is contained in:
parent
948c48909e
commit
8cff234bc6
16 changed files with 32 additions and 12 deletions
|
@ -6,6 +6,7 @@ using Discord.Commands;
|
|||
using Discord.WebSocket;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
using Geekbot.net.Lib.UserRepository;
|
||||
using StackExchange.Redis;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ using Discord;
|
|||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
using Geekbot.net.Lib.UserRepository;
|
||||
using OverwatchAPI;
|
||||
using OverwatchAPI.Config;
|
||||
|
|
|
@ -5,6 +5,7 @@ using Discord;
|
|||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
using PokeAPI;
|
||||
|
||||
namespace Geekbot.net.Commands.Games
|
||||
|
|
|
@ -7,6 +7,7 @@ using Discord.Commands;
|
|||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.Converters;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
using MtgApiManager.Lib.Service;
|
||||
|
||||
namespace Geekbot.net.Commands.Integrations
|
||||
|
|
|
@ -6,6 +6,7 @@ using Discord.Commands;
|
|||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.Clients;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
|
||||
namespace Geekbot.net.Commands.Integrations
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@ using Discord;
|
|||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Geekbot.net.Commands.Integrations.UbranDictionary
|
||||
|
|
|
@ -73,11 +73,9 @@ namespace Geekbot.net.Commands.Randomness
|
|||
await ReplyAsync("", false, Eb(_mediaProvider.GetFox()));
|
||||
}
|
||||
|
||||
private EmbedBuilder Eb(string image)
|
||||
private Embed Eb(string image)
|
||||
{
|
||||
var eb = new EmbedBuilder();
|
||||
eb.ImageUrl = image;
|
||||
return eb;
|
||||
return new EmbedBuilder {ImageUrl = image}.Build();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,6 +5,7 @@ using Discord;
|
|||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
using Geekbot.net.Lib.Levels;
|
||||
using StackExchange.Redis;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ using Discord;
|
|||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
using Geekbot.net.Lib.Localization;
|
||||
using StackExchange.Redis;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ using Discord;
|
|||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
using Geekbot.net.Lib.Levels;
|
||||
using StackExchange.Redis;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ using Discord.Commands;
|
|||
using Discord.WebSocket;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
using Geekbot.net.Lib.Extensions;
|
||||
using StackExchange.Redis;
|
||||
|
||||
namespace Geekbot.net.Commands.Utils
|
||||
|
|
|
@ -8,6 +8,7 @@ using Discord.Commands;
|
|||
using Geekbot.net.Lib;
|
||||
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;
|
||||
|
|
|
@ -189,12 +189,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