mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Discord Bot Start Changes
This commit is contained in:
parent
a792b10253
commit
8d9d208a66
2 changed files with 2 additions and 18 deletions
|
|
@ -147,12 +147,6 @@ namespace ServerManagerTool
|
|||
}
|
||||
}
|
||||
|
||||
public IServerManagerBot ServerManagerBot
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public static void DiscoverMachinePublicIP(bool forceOverride)
|
||||
{
|
||||
if (forceOverride || string.IsNullOrWhiteSpace(Config.Default.MachinePublicIP))
|
||||
|
|
@ -477,11 +471,9 @@ namespace ServerManagerTool
|
|||
{
|
||||
_tokenSource = new CancellationTokenSource();
|
||||
|
||||
ServerManagerBot = ServerManagerBotFactory.GetServerManagerBot();
|
||||
|
||||
Task discordTask = Task.Run(async () =>
|
||||
{
|
||||
await ServerManagerBot.StartAsync(Config.Default.DiscordBotToken, Config.Default.DiscordBotPrefix, Config.Default.DataDir, HandleDiscordCommand, _tokenSource.Token);
|
||||
await ServerManagerBotFactory.GetServerManagerBot()?.StartAsync(Config.Default.DiscordBotToken, Config.Default.DiscordBotPrefix, Config.Default.DataDir, HandleDiscordCommand, _tokenSource.Token);
|
||||
}, _tokenSource.Token)
|
||||
.ContinueWith(t => {
|
||||
var message = t.Exception.InnerException is null ? t.Exception.Message : t.Exception.InnerException.Message;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue