diff --git a/KfChatDotNetBot/Commands/ImageCommands.cs b/KfChatDotNetBot/Commands/ImageCommands.cs index bd2b6d6..948361d 100644 --- a/KfChatDotNetBot/Commands/ImageCommands.cs +++ b/KfChatDotNetBot/Commands/ImageCommands.cs @@ -167,7 +167,6 @@ public class GetRandomImage : ICommand public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) { - var logger = LogManager.GetCurrentClassLogger(); await using var db = new ApplicationDbContext(); var key = arguments["key"].Value.ToLower(); var images = db.Images.Where(i => i.Key == key); diff --git a/KfChatDotNetBot/Services/Zipline.cs b/KfChatDotNetBot/Services/Zipline.cs index 38b4eab..bb3df33 100644 --- a/KfChatDotNetBot/Services/Zipline.cs +++ b/KfChatDotNetBot/Services/Zipline.cs @@ -75,6 +75,11 @@ public static class Zipline return url; } + // public static async Task RehostFile(string url) + // { + // + // } + public static async Task IsZiplineEnabled() { var key = await SettingsProvider.GetValueAsync(BuiltIn.Keys.ZiplineKey); diff --git a/KfChatDotNetBot/Settings/BuiltIn.cs b/KfChatDotNetBot/Settings/BuiltIn.cs index f80fce3..0043dda 100644 --- a/KfChatDotNetBot/Settings/BuiltIn.cs +++ b/KfChatDotNetBot/Settings/BuiltIn.cs @@ -512,6 +512,11 @@ public static class BuiltIn public static string XeetEnabled = "Xeet.Enabled"; [BuiltInSetting("Connection string for bot's Redis", SettingValueType.Text)] public static string BotRedisConnectionString = "Bot.RedisConnectionString"; + [BuiltInSetting("Whether to automatically rehost images when they're added", SettingValueType.Boolean, "true", + BooleanRegex)] + public static string BotImageRehostEnabled = "Bot.Image.RehostEnabled"; + [BuiltInSetting("Domain to look for when determining whether to rehost", SettingValueType.Text, "i.ddos.lgbt")] + public static string BotImageRehostDomain = "Bot.Image.RehostDomain"; } }