Moved store providers to geekbot.net.lib.media

This commit is contained in:
Runebaas 2017-09-27 17:18:31 +02:00
parent 0078de8a7f
commit 7308e5257a
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
9 changed files with 13 additions and 9 deletions

View file

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

View file

@ -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}\"";

View file

@ -2,7 +2,7 @@
using System.IO;
using Serilog;
namespace Geekbot.net.Lib
namespace Geekbot.net.Lib.Media
{
public class CheckEmImageProvider : ICheckEmImageProvider
{

View file

@ -2,7 +2,7 @@
using System.IO;
using Serilog;
namespace Geekbot.net.Lib
namespace Geekbot.net.Lib.Media
{
internal class FortunesProvider : IFortunesProvider
{

View file

@ -2,7 +2,7 @@
using System.IO;
using Serilog;
namespace Geekbot.net.Lib
namespace Geekbot.net.Lib.Media
{
public class PandaProvider : IPandaProvider
{

View file

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

View file

@ -1,6 +1,6 @@
using System.Threading.Tasks;
using Discord.Commands;
using Geekbot.net.Lib;
using Geekbot.net.Lib.Media;
namespace Geekbot.net.Modules
{

View file

@ -1,6 +1,6 @@
using System.Threading.Tasks;
using Discord.Commands;
using Geekbot.net.Lib;
using Geekbot.net.Lib.Media;
namespace Geekbot.net.Modules
{

View file

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