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>
|
<Version>1.0.2</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.29.1.991" />
|
<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">
|
<PackageReference Include="HtmlAgilityPack.NetCore">
|
||||||
<Version>1.5.0.1</Version>
|
<Version>1.5.0.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace Geekbot.net.Lib
|
||||||
// this.botOwnerDmChannel = botOwnerDmChannel;
|
// this.botOwnerDmChannel = botOwnerDmChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void HandleCommandException(Exception e, ICommandContext Context)
|
public void HandleCommandException(Exception e, ICommandContext Context)
|
||||||
{
|
{
|
||||||
var errorMsg =
|
var errorMsg =
|
||||||
$"Error Occured while executing \"{Context.Message.Content}\", executed by \"{Context.User.Username}\"";
|
$"Error Occured while executing \"{Context.Message.Content}\", executed by \"{Context.User.Username}\"";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace Geekbot.net.Lib
|
namespace Geekbot.net.Lib.Media
|
||||||
{
|
{
|
||||||
public class CheckEmImageProvider : ICheckEmImageProvider
|
public class CheckEmImageProvider : ICheckEmImageProvider
|
||||||
{
|
{
|
|
@ -2,7 +2,7 @@
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace Geekbot.net.Lib
|
namespace Geekbot.net.Lib.Media
|
||||||
{
|
{
|
||||||
internal class FortunesProvider : IFortunesProvider
|
internal class FortunesProvider : IFortunesProvider
|
||||||
{
|
{
|
|
@ -2,7 +2,7 @@
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace Geekbot.net.Lib
|
namespace Geekbot.net.Lib.Media
|
||||||
{
|
{
|
||||||
public class PandaProvider : IPandaProvider
|
public class PandaProvider : IPandaProvider
|
||||||
{
|
{
|
|
@ -4,6 +4,7 @@ using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.net.Lib;
|
using Geekbot.net.Lib;
|
||||||
|
using Geekbot.net.Lib.Media;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace Geekbot.net.Modules
|
namespace Geekbot.net.Modules
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.net.Lib;
|
using Geekbot.net.Lib.Media;
|
||||||
|
|
||||||
namespace Geekbot.net.Modules
|
namespace Geekbot.net.Modules
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Geekbot.net.Lib;
|
using Geekbot.net.Lib.Media;
|
||||||
|
|
||||||
namespace Geekbot.net.Modules
|
namespace Geekbot.net.Modules
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,7 @@ using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Discord.WebSocket;
|
using Discord.WebSocket;
|
||||||
using Geekbot.net.Lib;
|
using Geekbot.net.Lib;
|
||||||
|
using Geekbot.net.Lib.Media;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using StackExchange.Redis;
|
using StackExchange.Redis;
|
||||||
|
@ -61,9 +62,9 @@ namespace Geekbot.net
|
||||||
redis = redisMultiplexer.GetDatabase(6);
|
redis = redisMultiplexer.GetDatabase(6);
|
||||||
logger.Information($"[Redis] Connected to db {redis.Database}");
|
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);
|
Environment.Exit(102);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +91,7 @@ namespace Geekbot.net
|
||||||
var fortunes = new FortunesProvider(RandomClient, logger);
|
var fortunes = new FortunesProvider(RandomClient, logger);
|
||||||
var checkEmImages = new CheckEmImageProvider(RandomClient, logger);
|
var checkEmImages = new CheckEmImageProvider(RandomClient, logger);
|
||||||
var pandaImages = new PandaProvider(RandomClient, logger);
|
var pandaImages = new PandaProvider(RandomClient, logger);
|
||||||
IErrorHandler errorHandler = new ErrorHandler(logger);
|
var errorHandler = new ErrorHandler(logger);
|
||||||
services.AddSingleton<IErrorHandler>(errorHandler);
|
services.AddSingleton<IErrorHandler>(errorHandler);
|
||||||
services.AddSingleton(redis);
|
services.AddSingleton(redis);
|
||||||
services.AddSingleton(RandomClient);
|
services.AddSingleton(RandomClient);
|
||||||
|
|
Loading…
Reference in a new issue