diff --git a/src/NadekoBot/Modules/Expressions/NadekoExpressions.cs b/src/NadekoBot/Modules/Expressions/NadekoExpressions.cs index cce639807..ba174db30 100644 --- a/src/NadekoBot/Modules/Expressions/NadekoExpressions.cs +++ b/src/NadekoBot/Modules/Expressions/NadekoExpressions.cs @@ -402,6 +402,7 @@ public partial class NadekoExpressions : NadekoModule } [Cmd] + [Ratelimit(300)] public async Task ExprsImport([Leftover] string input = null) { // todo cooldown on public bot for 1 day, limit 100 diff --git a/src/NadekoBot/Modules/Utility/Quote/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Quote/QuoteCommands.cs index 29e3963c8..6c297e9f6 100644 --- a/src/NadekoBot/Modules/Utility/Quote/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Quote/QuoteCommands.cs @@ -351,9 +351,6 @@ public partial class Utility [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.Administrator)] [Ratelimit(300)] -#if GLOBAL_NADEKO - [OwnerOnly] -#endif public async Task QuotesImport([Leftover] string? input = null) { input = input?.Trim(); diff --git a/src/NadekoBot/Services/Impl/BotCredsProvider.cs b/src/NadekoBot/Services/Impl/BotCredsProvider.cs index 2a1ae9cb9..ed8736c0f 100644 --- a/src/NadekoBot/Services/Impl/BotCredsProvider.cs +++ b/src/NadekoBot/Services/Impl/BotCredsProvider.cs @@ -49,18 +49,19 @@ public sealed class BotCredsProvider : IBotCredsProvider // this can fail in docker containers } - MigrateCredentials(); - - if (!File.Exists(CredsPath)) - { - Log.Warning( - "{CredsPath} is missing. Attempting to load creds from environment variables prefixed with 'NadekoBot_'. Example is in {CredsExamplePath}", - CredsPath, - CredsExamplePath); - } try { + MigrateCredentials(); + + if (!File.Exists(CredsPath)) + { + Log.Warning( + "{CredsPath} is missing. Attempting to load creds from environment variables prefixed with 'NadekoBot_'. Example is in {CredsExamplePath}", + CredsPath, + CredsExamplePath); + } + _config = new ConfigurationBuilder().AddYamlFile(CredsPath, false, true) .AddEnvironmentVariables("NadekoBot_") .Build(); @@ -141,6 +142,7 @@ public sealed class BotCredsProvider : IBotCredsProvider { creds.BotCache = BotCacheImplemenation.Redis; } + if (creds.Version <= 6) { creds.Version = 7;