mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Created Helper classes for Discord Bot and Plugin
This commit is contained in:
parent
8d9d208a66
commit
d526a3f457
8 changed files with 74 additions and 35 deletions
18
src/ConanServerManager/Utils/DiscordPluginHelper.cs
Normal file
18
src/ConanServerManager/Utils/DiscordPluginHelper.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using ServerManagerTool.Lib;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace ServerManagerTool.Utils
|
||||
{
|
||||
internal static class DiscordPluginHelper
|
||||
{
|
||||
public static IList<Plugin.Common.Lib.Profile> FetchProfiles()
|
||||
{
|
||||
return ServerManager.Instance.Servers.Select(s => new ServerManagerTool.Plugin.Common.Lib.Profile()
|
||||
{
|
||||
ProfileName = s?.Profile?.ProfileName ?? string.Empty,
|
||||
InstallationFolder = s?.Profile?.InstallDirectory ?? string.Empty
|
||||
}).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue