mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-24 09:24:12 +00:00
Move database initialization to program start
This commit is contained in:
parent
3c73be3ee7
commit
d08fc45774
2 changed files with 4 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using BirthdayBot.Data;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BirthdayBot
|
||||
|
@ -13,6 +14,8 @@ namespace BirthdayBot
|
|||
BotStartTime = DateTimeOffset.UtcNow;
|
||||
var cfg = new Configuration();
|
||||
|
||||
await Database.DoInitialDatabaseSetupAsync();
|
||||
|
||||
Console.CancelKeyPress += OnCancelKeyPressed;
|
||||
_bot = new ShardManager(cfg);
|
||||
|
||||
|
|
|
@ -55,8 +55,6 @@ namespace BirthdayBot
|
|||
/// </summary>
|
||||
public async Task StartAsync()
|
||||
{
|
||||
await Database.DoInitialDatabaseSetupAsync();
|
||||
|
||||
await DiscordClient.LoginAsync(TokenType.Bot, Config.BotToken);
|
||||
await DiscordClient.StartAsync();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue