Moved store providers to geekbot.net.lib.media
This commit is contained in:
parent
0078de8a7f
commit
7308e5257a
9 changed files with 13 additions and 9 deletions
|
@ -14,6 +14,8 @@
|
|||
<Version>1.0.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.29.1.991" />
|
||||
<PackageReference Include="Hangfire" Version="1.6.17" />
|
||||
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.7.0" />
|
||||
<PackageReference Include="HtmlAgilityPack.NetCore">
|
||||
<Version>1.5.0.1</Version>
|
||||
</PackageReference>
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Geekbot.net.Lib
|
|||
// this.botOwnerDmChannel = botOwnerDmChannel;
|
||||
}
|
||||
|
||||
public async void HandleCommandException(Exception e, ICommandContext Context)
|
||||
public void HandleCommandException(Exception e, ICommandContext Context)
|
||||
{
|
||||
var errorMsg =
|
||||
$"Error Occured while executing \"{Context.Message.Content}\", executed by \"{Context.User.Username}\"";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
using System.IO;
|
||||
using Serilog;
|
||||
|
||||
namespace Geekbot.net.Lib
|
||||
namespace Geekbot.net.Lib.Media
|
||||
{
|
||||
public class CheckEmImageProvider : ICheckEmImageProvider
|
||||
{
|
|
@ -2,7 +2,7 @@
|
|||
using System.IO;
|
||||
using Serilog;
|
||||
|
||||
namespace Geekbot.net.Lib
|
||||
namespace Geekbot.net.Lib.Media
|
||||
{
|
||||
internal class FortunesProvider : IFortunesProvider
|
||||
{
|
|
@ -2,7 +2,7 @@
|
|||
using System.IO;
|
||||
using Serilog;
|
||||
|
||||
namespace Geekbot.net.Lib
|
||||
namespace Geekbot.net.Lib.Media
|
||||
{
|
||||
public class PandaProvider : IPandaProvider
|
||||
{
|
|
@ -4,6 +4,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.Media;
|
||||
using Serilog;
|
||||
|
||||
namespace Geekbot.net.Modules
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.Media;
|
||||
|
||||
namespace Geekbot.net.Modules
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.Media;
|
||||
|
||||
namespace Geekbot.net.Modules
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@ using Discord;
|
|||
using Discord.Commands;
|
||||
using Discord.WebSocket;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.Media;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Serilog;
|
||||
using StackExchange.Redis;
|
||||
|
@ -61,9 +62,9 @@ namespace Geekbot.net
|
|||
redis = redisMultiplexer.GetDatabase(6);
|
||||
logger.Information($"[Redis] Connected to db {redis.Database}");
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.Information("Start Redis pls...");
|
||||
logger.Fatal(e, "Redis Connection Failed");
|
||||
Environment.Exit(102);
|
||||
}
|
||||
|
||||
|
@ -90,7 +91,7 @@ namespace Geekbot.net
|
|||
var fortunes = new FortunesProvider(RandomClient, logger);
|
||||
var checkEmImages = new CheckEmImageProvider(RandomClient, logger);
|
||||
var pandaImages = new PandaProvider(RandomClient, logger);
|
||||
IErrorHandler errorHandler = new ErrorHandler(logger);
|
||||
var errorHandler = new ErrorHandler(logger);
|
||||
services.AddSingleton<IErrorHandler>(errorHandler);
|
||||
services.AddSingleton(redis);
|
||||
services.AddSingleton(RandomClient);
|
||||
|
|
Loading…
Reference in a new issue