-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split Config into ConfigManager and Config Sections
- Loading branch information
root
committed
Sep 23, 2024
1 parent
a17d3a9
commit 7d1aefe
Showing
2 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using Discord; | ||
|
||
namespace QuickEdit.Config; | ||
|
||
public sealed class DiscordConfig | ||
{ | ||
public const string ConfigurationSectionName = "DiscordConfig"; | ||
|
||
// TODO: Move the Token to user secrets at some point | ||
|
||
[Required] | ||
[RegularExpression(@"^([MN][\w-]{23,25})\.([\w-]{6})\.([\w-]{27,39})$", ErrorMessage = "Invalid token format")] | ||
public required string Token { get; set; } | ||
public ActivityType StatusType { get; set; } | ||
public string? Status { get; set; } | ||
public bool Debug { get; set; } | ||
} |