mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-04-30 03:22:04 -04:00
WIP rehost stuff
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -75,6 +75,11 @@ public static class Zipline
|
||||
return url;
|
||||
}
|
||||
|
||||
// public static async Task<string> RehostFile(string url)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
|
||||
public static async Task<bool> IsZiplineEnabled()
|
||||
{
|
||||
var key = await SettingsProvider.GetValueAsync(BuiltIn.Keys.ZiplineKey);
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user