Adds reward api port to bot config
This commit is contained in:
parent
7d33c1c113
commit
dd5baeda46
|
@ -19,9 +19,11 @@ namespace BiblioTech
|
|||
[Uniform("admin-channel-name", "ac", "ADMINCHANNELNAME", true, "Name of the Discord server channel where admin commands are allowed.")]
|
||||
public string AdminChannelName { get; set; } = "admin-channel";
|
||||
|
||||
[Uniform("rewards-channel-name", "ac", "REWARDSCHANNELNAME", false, "Name of the Discord server channel where participation rewards will be announced.")]
|
||||
[Uniform("rewards-channel-name", "rc", "REWARDSCHANNELNAME", false, "Name of the Discord server channel where participation rewards will be announced.")]
|
||||
public string RewardsChannelName { get; set; } = "";
|
||||
|
||||
[Uniform("reward-api-port", "rp", "REWARDAPIPORT", false, "TCP listen port for the reward API.")]
|
||||
public int RewardApiPort { get; set; } = 31080;
|
||||
|
||||
public string EndpointsPath
|
||||
{
|
||||
|
|
|
@ -25,9 +25,11 @@ namespace BiblioTech.Rewards
|
|||
public void Start()
|
||||
{
|
||||
cts = new CancellationTokenSource();
|
||||
listener.Prefixes.Add($"http://*:31080/");
|
||||
var uri = $"http://*:{Program.Config.RewardApiPort}/";
|
||||
listener.Prefixes.Add(uri);
|
||||
listener.Start();
|
||||
taskFactory.Run(ConnectionDispatcher, nameof(ConnectionDispatcher));
|
||||
Program.Log.Log($"Reward API listening on '{uri}'");
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
|
|
Loading…
Reference in New Issue