- Credentials are now loading from creds.yml

- Removed/commented out obsolete credentials code
- Added missing properties to creds.yml
- Updated README.md with some tasks and progress
This commit is contained in:
Kwoth
2021-06-23 18:11:52 +02:00
parent 78d077ce71
commit 16dd398aa0
12 changed files with 254 additions and 290 deletions

View File

@@ -6,6 +6,7 @@ using NadekoBot.Services;
using System;
using System.IO;
using Microsoft.Extensions.Logging;
using Nadeko.Common;
using NadekoBot.Db.Models;
namespace NadekoBot.Services.Database
@@ -16,7 +17,7 @@ namespace NadekoBot.Services.Database
{
LogSetup.SetupLogger(-2);
var optionsBuilder = new DbContextOptionsBuilder<NadekoContext>();
IBotCredentials creds = new BotCredentials();
IBotCredentials creds = BotCredentialsProvider.CreateBotCredentials();
var builder = new SqliteConnectionStringBuilder(creds.Db.ConnectionString);
builder.DataSource = Path.Combine(AppContext.BaseDirectory, builder.DataSource);
optionsBuilder.UseSqlite(builder.ToString());