2023-10-18 09:01:24 +00:00
|
|
|
|
using ArgsUniform;
|
2024-05-21 11:09:46 +00:00
|
|
|
|
using System.Numerics;
|
2023-10-18 09:01:24 +00:00
|
|
|
|
|
|
|
|
|
namespace BiblioTech
|
|
|
|
|
{
|
|
|
|
|
public class Configuration
|
|
|
|
|
{
|
|
|
|
|
[Uniform("token", "t", "TOKEN", true, "Discord Application Token")]
|
|
|
|
|
public string ApplicationToken { get; set; } = string.Empty;
|
|
|
|
|
|
2024-05-16 09:54:31 +00:00
|
|
|
|
[Uniform("server-id", "sn", "SERVERID", true, "ID of the Discord server")]
|
|
|
|
|
public ulong ServerId { get; set; }
|
2023-10-18 12:59:39 +00:00
|
|
|
|
|
2024-05-16 12:05:58 +00:00
|
|
|
|
[Uniform("datapath", "dp", "DATAPATH", true, "Root path where all data files will be saved.")]
|
2023-10-25 09:53:33 +00:00
|
|
|
|
public string DataPath { get; set; } = "datapath";
|
|
|
|
|
|
2024-05-16 09:54:31 +00:00
|
|
|
|
[Uniform("admin-role-id", "a", "ADMINROLEID", true, "ID of the Discord server admin role")]
|
|
|
|
|
public ulong AdminRoleId { get; set; }
|
2023-10-25 08:38:21 +00:00
|
|
|
|
|
2024-05-16 09:54:31 +00:00
|
|
|
|
[Uniform("admin-channel-id", "ac", "ADMINCHANNELID", true, "ID of the Discord server channel where admin commands are allowed.")]
|
|
|
|
|
public ulong AdminChannelId{ get; set; }
|
2023-10-25 09:53:33 +00:00
|
|
|
|
|
2024-05-16 09:54:31 +00:00
|
|
|
|
[Uniform("rewards-channel-id", "rc", "REWARDSCHANNELID", false, "ID of the Discord server channel where participation rewards will be announced.")]
|
|
|
|
|
public ulong RewardsChannelId { get; set; }
|
2023-12-20 14:56:03 +00:00
|
|
|
|
|
2024-05-16 09:54:31 +00:00
|
|
|
|
[Uniform("chain-events-channel-id", "cc", "CHAINEVENTSCHANNELID", false, "ID of the Discord server channel where chain events will be posted.")]
|
2024-05-16 12:05:58 +00:00
|
|
|
|
public ulong ChainEventsChannelId { get; set; }
|
2024-04-08 11:55:39 +00:00
|
|
|
|
|
2024-05-16 12:05:58 +00:00
|
|
|
|
[Uniform("reward-api-port", "rp", "REWARDAPIPORT", true, "TCP listen port for the reward API.")]
|
2024-02-01 22:02:10 +00:00
|
|
|
|
public int RewardApiPort { get; set; } = 31080;
|
2023-12-20 14:56:03 +00:00
|
|
|
|
|
2024-05-16 12:05:58 +00:00
|
|
|
|
[Uniform("send-eth", "se", "SENDETH", true, "Amount of Eth send by the mint command.")]
|
2024-03-29 10:24:11 +00:00
|
|
|
|
public int SendEth { get; set; } = 10;
|
|
|
|
|
|
2024-05-22 09:06:34 +00:00
|
|
|
|
[Uniform("mint-tt", "mt", "MINTTT", true, "Amount of TSTWEI minted by the mint command.")]
|
2024-05-21 11:09:46 +00:00
|
|
|
|
public BigInteger MintTT { get; set; } = 1073741824;
|
2024-03-29 10:24:11 +00:00
|
|
|
|
|
2024-05-16 14:00:19 +00:00
|
|
|
|
[Uniform("no-discord", "nd", "NODISCORD", false, "For debugging: Bypasses all Discord API calls.")]
|
|
|
|
|
public int NoDiscord { get; set; } = 0;
|
|
|
|
|
|
2024-10-16 12:05:02 +00:00
|
|
|
|
[Uniform("codex-endpoint", "ce", "CODEXENDPOINT", false, "Codex endpoint. (default 'http://localhost:8080')")]
|
|
|
|
|
public string CodexEndpoint { get; set; } = "http://localhost:8080";
|
|
|
|
|
|
|
|
|
|
[Uniform("codex-endpoint-auth", "cea", "CODEXENDPOINTAUTH", false, "Codex endpoint basic auth. Colon separated username and password. (default: empty, no auth used.)")]
|
|
|
|
|
public string CodexEndpointAuth { get; set; } = "";
|
|
|
|
|
|
2024-05-16 14:00:19 +00:00
|
|
|
|
public string EndpointsPath => Path.Combine(DataPath, "endpoints");
|
|
|
|
|
public string UserDataPath => Path.Combine(DataPath, "users");
|
|
|
|
|
public string LogPath => Path.Combine(DataPath, "logs");
|
|
|
|
|
public bool DebugNoDiscord => NoDiscord == 1;
|
2023-10-18 09:01:24 +00:00
|
|
|
|
}
|
|
|
|
|
}
|