-
Notifications
You must be signed in to change notification settings - Fork 0
/
AlbionBotModule.cs
38 lines (34 loc) · 1.14 KB
/
AlbionBotModule.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
namespace AlbionStatusBot
{
using System.Collections.Generic;
using System.Net;
using AlbionApi;
using Bot;
using DotNetEnv;
using Job;
using LiteDB;
using Microsoft.Extensions.Configuration;
using Ninject.Modules;
using Quartz;
public class AlbionBotModule : NinjectModule
{
public override void Load()
{
Bind<IConfiguration>().ToMethod(context =>
new ConfigurationBuilder()
.AddInMemoryCollection(new Dictionary<string, string>
{
{"bot_token", Env.GetString("BOT_TOKEN")},
{"notification_channel", Env.GetString("NOTIFICATION_CHANNEL")}
}).Build()
);
Bind<LiteDatabase>().ToMethod(context => new LiteDatabase("albion.kukarek"));
Bind<NinjectJobFactory>().ToSelf();
Bind<IJob>().To<UpdateStatusJob>();
Bind<Scheduler>().ToSelf();
Bind<IWebProxy>().ToMethod(context => new WebProxy());
Bind<AlbionApiClient>().ToSelf();
Bind<TelegramBot>().ToSelf();
}
}
}