small code refactoring

This commit is contained in:
Schedel Pascal
2024-06-19 08:10:16 +02:00
parent 20770bed31
commit c9216ac79b
93 changed files with 2753 additions and 5835 deletions

View File

@@ -1,34 +1,30 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Updating.Administration.Discord
namespace Pilz.Updating.Administration.Discord;
public class DiscordBotConfig
{
public class DiscordBotConfig
public string DiscordBotToken { 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()
{
public string DiscordBotToken { 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 }
};
{ Channels.Stable, null },
{ Channels.PreRelease, null },
{ Channels.Beta, null },
{ Channels.Alpha, null }
};
[JsonProperty, Obsolete]
private string DefaultUpdateMessage
[JsonProperty, Obsolete]
private string DefaultUpdateMessage
{
set
{
set
{
foreach (var keys in DefaultUpdateMessages.Keys)
DefaultUpdateMessages[keys] = value;
}
foreach (var keys in DefaultUpdateMessages.Keys)
DefaultUpdateMessages[keys] = value;
}
}
}