mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 15:27:21 +01:00
some refactoring
This commit is contained in:
parent
880676de09
commit
dc33858626
48 changed files with 448 additions and 112 deletions
|
|
@ -0,0 +1,31 @@
|
|||
using System.Text;
|
||||
|
||||
namespace MareSynchronosShared.Utils.Configuration;
|
||||
|
||||
public class ServicesConfiguration : MareConfigurationBase
|
||||
{
|
||||
public string DiscordBotToken { get; set; } = string.Empty;
|
||||
public ulong? DiscordChannelForMessages { get; set; } = null;
|
||||
public ulong? DiscordChannelForReports { get; set; } = null;
|
||||
public ulong? DiscordChannelForCommands { get; set; } = null;
|
||||
public ulong? DiscordRoleAprilFools2024 { get; set; } = null;
|
||||
public Uri MainServerAddress { get; set; } = null;
|
||||
public Dictionary<ulong, string> VanityRoles { get; set; } = new Dictionary<ulong, string>();
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new();
|
||||
sb.AppendLine(base.ToString());
|
||||
sb.AppendLine($"{nameof(DiscordBotToken)} => {DiscordBotToken}");
|
||||
sb.AppendLine($"{nameof(MainServerAddress)} => {MainServerAddress}");
|
||||
sb.AppendLine($"{nameof(DiscordChannelForMessages)} => {DiscordChannelForMessages}");
|
||||
sb.AppendLine($"{nameof(DiscordChannelForReports)} => {DiscordChannelForReports}");
|
||||
sb.AppendLine($"{nameof(DiscordChannelForCommands)} => {DiscordChannelForCommands}");
|
||||
sb.AppendLine($"{nameof(DiscordRoleAprilFools2024)} => {DiscordRoleAprilFools2024}");
|
||||
foreach (var role in VanityRoles)
|
||||
{
|
||||
sb.AppendLine($"{nameof(VanityRoles)} => {role.Key} = {role.Value}");
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue