mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-18 09:35:48 +00:00
Server Manager Changes
1. Added Discord Bot section to Global Settings 2. Added Discord Bot section to Server Settings.
This commit is contained in:
parent
c5775181b3
commit
a792b10253
20 changed files with 389 additions and 11 deletions
|
|
@ -230,9 +230,9 @@ namespace ServerManagerTool
|
|||
return LogManager.GetLogger(loggerName);
|
||||
}
|
||||
|
||||
private static IList<string> HandleDiscordCommand(CommandType commandType, string channelId, string profileId)
|
||||
private static IList<string> HandleDiscordCommand(CommandType commandType, string serverId, string channelId, string profileId)
|
||||
{
|
||||
return null;
|
||||
return new List<string>() { $"{commandType}; {serverId}; {channelId}; {profileId ?? "no profile"}" };
|
||||
}
|
||||
|
||||
private static void MigrateSettings()
|
||||
|
|
@ -462,7 +462,7 @@ namespace ServerManagerTool
|
|||
|
||||
Task discordTask = Task.Run(async () =>
|
||||
{
|
||||
await ServerManagerBot.StartAsync(Config.Default.DiscordBotPrefix, Config.Default.DiscordBotToken, Config.Default.DataPath, HandleDiscordCommand, _tokenSource.Token);
|
||||
await ServerManagerBot.StartAsync(Config.Default.DiscordBotToken,Config.Default.DiscordBotPrefix, Config.Default.DataPath, 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