diff --git a/Behavior/QRify.cs b/Behavior/QRify.cs index 37b9ff5..56ad7f2 100644 --- a/Behavior/QRify.cs +++ b/Behavior/QRify.cs @@ -45,7 +45,7 @@ public class QRify : Behavior if(message.Channel.EffectivePermissions.MaxAttachmentBytes < (ulong)(new System.IO.FileInfo($"tmp/qr{todaysnumber}.png").Length)) await message.Channel.SendFile($"tmp/qr{todaysnumber}.png", null); else - message.Channel.SendMessage("resulting qr image 2 big 4 here"); + await message.Channel.SendMessage("resulting qr image 2 big 4 here"); File.Delete($"tmp/qr{todaysnumber}.svg"); File.Delete($"tmp/qr{todaysnumber}.png"); } diff --git a/Configuration.cs b/Configuration.cs deleted file mode 100644 index b34253c..0000000 --- a/Configuration.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Newtonsoft.Json; -using vassago.TwitchInterface; - -namespace vassago -{ - public class Configuration - { - public string ExchangePairsLocation { get; set; } - public IEnumerable DiscordTokens { get; set; } - public IEnumerable TwitchConfigs { get; set; } - public string DBConnectionString { get; set; } - } -} \ No newline at end of file diff --git a/ConsoleService.cs b/ConsoleService.cs index b21fe72..065e7bc 100644 --- a/ConsoleService.cs +++ b/ConsoleService.cs @@ -6,34 +6,33 @@ namespace vassago internal class ConsoleService : IHostedService { - Configuration config = new Configuration(); public ConsoleService(IConfiguration aspConfig) { - config.DBConnectionString = aspConfig["DBConnectionString"]; - config.ExchangePairsLocation = aspConfig["ExchangePairsLocation"]; - config.DiscordTokens = aspConfig.GetSection("DiscordTokens").Get>(); - config.TwitchConfigs = aspConfig.GetSection("TwitchConfigs").Get>(); + Shared.DBConnectionString = aspConfig["DBConnectionString"]; + DiscordTokens = aspConfig.GetSection("DiscordTokens").Get>(); + TwitchConfigs = aspConfig.GetSection("TwitchConfigs").Get>(); + Conversion.Converter.Load(aspConfig["ExchangePairsLocation"]); } + IEnumerable DiscordTokens { get; } + IEnumerable TwitchConfigs { get; } + public async Task StartAsync(CancellationToken cancellationToken) { - Shared.DBConnectionString = config.DBConnectionString; var dbc = new ChattingContext(); dbc.Database.EnsureCreated(); - Conversion.Converter.Load(config.ExchangePairsLocation); - - if (config.DiscordTokens?.Any() ?? false) - foreach (var dt in config.DiscordTokens) + if (DiscordTokens?.Any() ?? false) + foreach (var dt in DiscordTokens) { var d = new DiscordInterface.DiscordInterface(); await d.Init(dt); ProtocolInterfaces.ProtocolList.discords.Add(d); } - if (config.TwitchConfigs?.Any() ?? false) - foreach (var tc in config.TwitchConfigs) + if (TwitchConfigs?.Any() ?? false) + foreach (var tc in TwitchConfigs) { var t = new TwitchInterface.TwitchInterface(); await t.Init(tc); diff --git a/Views/Home/Privacy.cshtml b/Views/Home/Privacy.cshtml deleted file mode 100644 index 2479fb7..0000000 --- a/Views/Home/Privacy.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Privacy Policy"; -} -

@ViewData["Title"]

- -

Use this page to detail your site's privacy policy.