- small bot.cs cleanup

- creds.yml now loads and reloads properly (from the current directory, like credentials.json)
- added empty creds.yml to repo, and added it to .gitignore
This commit is contained in:
Kwoth
2021-06-24 15:43:53 +02:00
parent 16dd398aa0
commit a1ef862382
13 changed files with 215 additions and 208 deletions

View File

@@ -17,7 +17,7 @@ namespace NadekoBot.Services.Database
{
LogSetup.SetupLogger(-2);
var optionsBuilder = new DbContextOptionsBuilder<NadekoContext>();
IBotCredentials creds = BotCredentialsProvider.CreateBotCredentials();
IBotCredentials creds = new BotCredsProvider().GetCreds();
var builder = new SqliteConnectionStringBuilder(creds.Db.ConnectionString);
builder.DataSource = Path.Combine(AppContext.BaseDirectory, builder.DataSource);
optionsBuilder.UseSqlite(builder.ToString());