ServerManagers/src/ARKServerManager/Utils/DiscordPluginHelper.cs
2021-12-04 15:01:47 +10:00

18 lines
577 B
C#

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();
}
}
}