default discord message by current Channel & a few fixes

This commit is contained in:
2022-11-20 11:33:42 +01:00
parent 83b8b4c88e
commit 82e6528ca8
4 changed files with 102 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -9,9 +10,25 @@ namespace Pilz.Updating.Administration.Discord
public class DiscordBotConfig
{
public string DiscordBotToken { get; set; } = string.Empty;
public string DefaultUpdateMessage { get; set; } = string.Empty;
public string DefaultAppName { get; set; } = string.Empty;
public string UpdateNotificationRoll { get; set; } = string.Empty;
public bool UseProxy { get; set; } = true;
public Dictionary<Channels, string> DefaultUpdateMessages { get; } = new()
{
{ Channels.Stable, null },
{ Channels.PreRelease, null },
{ Channels.Beta, null },
{ Channels.Alpha, null }
};
[JsonProperty, Obsolete]
private string DefaultUpdateMessage
{
set
{
foreach (var keys in DefaultUpdateMessages.Keys)
DefaultUpdateMessages[keys] = value;
}
}
}
}