.qimport will is no longer owner only on the public bot
Creds issues should now be properly caught and logged, instead of showing unhandled exceptions
This commit is contained in:
parent
140a35b82a
commit
78366ab7e4
4 changed files with 12 additions and 13 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -21,6 +21,7 @@ src/EllieBot/old_credentials.json
|
||||||
src/EllieBot/credentials.json.bak
|
src/EllieBot/credentials.json.bak
|
||||||
src/EllieBot/data/EllieBot.db
|
src/EllieBot/data/EllieBot.db
|
||||||
ellie-menu.ps1
|
ellie-menu.ps1
|
||||||
|
package.sh
|
||||||
|
|
||||||
# Created by https://www.gitignore.io/api/visualstudio,visualstudiocode,windows,linux,macos
|
# Created by https://www.gitignore.io/api/visualstudio,visualstudiocode,windows,linux,macos
|
||||||
|
|
||||||
|
|
|
@ -401,6 +401,7 @@ public partial class EllieExpressions : EllieModule<EllieExpressionsService>
|
||||||
}
|
}
|
||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
|
[Ratelimit(300)]
|
||||||
public async Task ExprsImport([Leftover] string input = null)
|
public async Task ExprsImport([Leftover] string input = null)
|
||||||
{
|
{
|
||||||
// todo cooldown on public bot for 1 day, limit 100
|
// todo cooldown on public bot for 1 day, limit 100
|
||||||
|
|
|
@ -351,9 +351,6 @@ public partial class Utility
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[UserPerm(GuildPerm.Administrator)]
|
[UserPerm(GuildPerm.Administrator)]
|
||||||
[Ratelimit(300)]
|
[Ratelimit(300)]
|
||||||
#if GLOBAL_NADEKO
|
|
||||||
[OwnerOnly]
|
|
||||||
#endif
|
|
||||||
public async Task QuotesImport([Leftover] string? input = null)
|
public async Task QuotesImport([Leftover] string? input = null)
|
||||||
{
|
{
|
||||||
input = input?.Trim();
|
input = input?.Trim();
|
||||||
|
|
|
@ -49,6 +49,8 @@ public sealed class BotCredsProvider : IBotCredsProvider
|
||||||
// this can fail in docker containers
|
// this can fail in docker containers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
MigrateCredentials();
|
MigrateCredentials();
|
||||||
|
|
||||||
if (!File.Exists(CredsPath))
|
if (!File.Exists(CredsPath))
|
||||||
|
@ -59,8 +61,6 @@ public sealed class BotCredsProvider : IBotCredsProvider
|
||||||
CredsExamplePath);
|
CredsExamplePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
_config = new ConfigurationBuilder().AddYamlFile(CredsPath, false, true)
|
_config = new ConfigurationBuilder().AddYamlFile(CredsPath, false, true)
|
||||||
.AddEnvironmentVariables("EllieBot_")
|
.AddEnvironmentVariables("EllieBot_")
|
||||||
.Build();
|
.Build();
|
||||||
|
|
Loading…
Reference in a new issue