small code refactoring
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user