Reworked the Config system
This commit is contained in:
@@ -5,8 +5,8 @@ namespace CppWrapper.Objects
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||
public struct ApplicationStruct
|
||||
{
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 19)]
|
||||
public string ServerId;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
|
||||
public ulong[] ServerIds;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]
|
||||
public string Prefix;
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace CppWrapper.Objects
|
||||
{
|
||||
return new ApplicationStruct
|
||||
{
|
||||
Token = application.ApplicationEnvironmentVariables["token"],
|
||||
Prefix = application.ApplicationEnvironmentVariables["prefix"],
|
||||
ServerId = application.ServerID
|
||||
Token = application.ApplicationEnvironmentVariables.Get<string>("token") ?? throw new Exception("Token not found"),
|
||||
Prefix = application.ApplicationEnvironmentVariables.Get<string>("prefix") ?? throw new Exception("Prefix not found"),
|
||||
ServerIds = application.ServerIDs.ToArray()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user