mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
WIP db provider support for Mysql and Postgres
This commit is contained in:
@@ -41,10 +41,7 @@ public sealed class Bot
|
||||
_credsProvider = new BotCredsProvider(totalShards);
|
||||
_creds = _credsProvider.GetCreds();
|
||||
|
||||
_db = new(_creds);
|
||||
|
||||
if (shardId == 0)
|
||||
_db.Setup();
|
||||
_db = new(_credsProvider);
|
||||
|
||||
var messageCacheSize =
|
||||
#if GLOBAL_NADEKO
|
||||
@@ -286,6 +283,9 @@ public sealed class Bot
|
||||
|
||||
public async Task RunAsync()
|
||||
{
|
||||
if (ShardId == 0)
|
||||
await _db.SetupAsync();
|
||||
|
||||
var sw = Stopwatch.StartNew();
|
||||
|
||||
await LoginAsync(_creds.Token);
|
||||
|
Reference in New Issue
Block a user