Make main async
This commit is contained in:
parent
efed2f7120
commit
5e9cb8a4c1
1 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ namespace Geekbot.net
|
||||||
private IReactionListener _reactionListener;
|
private IReactionListener _reactionListener;
|
||||||
private IGuildSettingsManager _guildSettingsManager;
|
private IGuildSettingsManager _guildSettingsManager;
|
||||||
|
|
||||||
private static void Main(string[] args)
|
private static async Task Main(string[] args)
|
||||||
{
|
{
|
||||||
RunParameters runParameters = null;
|
RunParameters runParameters = null;
|
||||||
Parser.Default.ParseArguments<RunParameters>(args)
|
Parser.Default.ParseArguments<RunParameters>(args)
|
||||||
|
@ -63,7 +63,7 @@ namespace Geekbot.net
|
||||||
logger.Information(LogSource.Geekbot, "Starting...");
|
logger.Information(LogSource.Geekbot, "Starting...");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
new Program().MainAsync(runParameters, logger).GetAwaiter().GetResult();
|
await new Program().Start(runParameters, logger);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,7 @@ namespace Geekbot.net
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task MainAsync(RunParameters runParameters, GeekbotLogger logger)
|
private async Task Start(RunParameters runParameters, GeekbotLogger logger)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_runParameters = runParameters;
|
_runParameters = runParameters;
|
||||||
|
|
Loading…
Reference in a new issue