mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
GetServerInfo, GetServerList and GetServerStatus done
This commit is contained in:
parent
d526a3f457
commit
824daed0d1
27 changed files with 484 additions and 91 deletions
|
|
@ -3,15 +3,13 @@ using NLog.Config;
|
|||
using NLog.Targets;
|
||||
using ServerManagerTool.Common;
|
||||
using ServerManagerTool.Common.Utils;
|
||||
using ServerManagerTool.Discord;
|
||||
using ServerManagerTool.Discord.Enums;
|
||||
using ServerManagerTool.DiscordBot;
|
||||
using ServerManagerTool.Enums;
|
||||
using ServerManagerTool.Lib;
|
||||
using ServerManagerTool.Plugin.Common;
|
||||
using ServerManagerTool.Utils;
|
||||
using ServerManagerTool.Windows;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
|
@ -214,11 +212,6 @@ namespace ServerManagerTool
|
|||
return LogManager.GetLogger(loggerName);
|
||||
}
|
||||
|
||||
private static IList<string> HandleDiscordCommand(CommandType commandType, string serverId, string channelId, string profileId)
|
||||
{
|
||||
return new List<string>() { $"{commandType}; {serverId}; {channelId}; {profileId ?? "no profile"}" };
|
||||
}
|
||||
|
||||
private static void MigrateSettings()
|
||||
{
|
||||
var installFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
|
|
@ -444,7 +437,7 @@ namespace ServerManagerTool
|
|||
|
||||
Task discordTask = Task.Run(async () =>
|
||||
{
|
||||
await ServerManagerBotFactory.GetServerManagerBot()?.StartAsync(Config.Default.DiscordBotToken,Config.Default.DiscordBotPrefix, Config.Default.DataPath, DiscordBotHelper.HandleDiscordCommand, _tokenSource.Token);
|
||||
await ServerManagerBotFactory.GetServerManagerBot()?.StartAsync(Config.Default.DiscordBotToken,Config.Default.DiscordBotPrefix, Config.Default.DataPath, DiscordBotHelper.HandleDiscordCommand, DiscordBotHelper.HandleTranslation, _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