1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 00:19:00 +03:00
Octobot/TeamOctolings.Octobot/Data/GuildSettings.cs
Octol1ttle 793afd0e06
Apply official naming guidelines to Octobot (#306)
1. The root namespace was changed from `Octobot` to
`TeamOctolings.Octobot`:
> DO prefix namespace names with a company name to prevent namespaces
from different companies from having the same name.
2. `Octobot.cs` was renamed to `Program.cs`:
> DO NOT use the same name for a namespace and a type in that namespace.
3. `IOption`, `Option` were renamed to `IGuildOption` and `GuildOption`
respectively:
> DO NOT introduce generic type names such as Element, Node, Log, and
Message.
4. `Utility` was moved out of the `Services` namespace. It didn't belong
there anyway
5. `Program` static fields were moved to `Utility`
6. Localisation files were moved back to the project source files. Looks
like this fixed `Message.Designer.cs` code generation

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2024-05-16 20:34:26 +05:00

87 lines
4.1 KiB
C#

using Remora.Discord.API.Abstractions.Objects;
using TeamOctolings.Octobot.Data.Options;
using TeamOctolings.Octobot.Responders;
namespace TeamOctolings.Octobot.Data;
/// <summary>
/// Contains all per-guild settings that can be set by a member
/// with <see cref="DiscordPermission.ManageGuild" /> using the /settings command
/// </summary>
public static class GuildSettings
{
public static readonly LanguageOption Language = new("Language", "en");
/// <summary>
/// Controls what message should be sent in <see cref="PublicFeedbackChannel" /> when a new member joins the guild.
/// </summary>
/// <remarks>
/// <list type="bullet">
/// <item>No message will be sent if set to "off", "disable" or "disabled".</item>
/// <item><see cref="Messages.DefaultWelcomeMessage" /> will be sent if set to "default" or "reset".</item>
/// </list>
/// </remarks>
/// <seealso cref="GuildMemberJoinedResponder" />
public static readonly GuildOption<string> WelcomeMessage = new("WelcomeMessage", "default");
/// <summary>
/// Controls what message should be sent in <see cref="PublicFeedbackChannel" /> when a member leaves the guild.
/// </summary>
/// <remarks>
/// <list type="bullet">
/// <item>No message will be sent if set to "off", "disable" or "disabled".</item>
/// <item><see cref="Messages.DefaultLeaveMessage" /> will be sent if set to "default" or "reset".</item>
/// </list>
/// </remarks>
/// <seealso cref="GuildMemberLeftResponder" />
public static readonly GuildOption<string> LeaveMessage = new("LeaveMessage", "default");
/// <summary>
/// Controls whether or not the <see cref="Messages.Ready" /> message should be sent
/// in <see cref="PrivateFeedbackChannel" /> on startup.
/// </summary>
/// <seealso cref="GuildLoadedResponder" />
public static readonly BoolOption ReceiveStartupMessages = new("ReceiveStartupMessages", false);
public static readonly BoolOption RemoveRolesOnMute = new("RemoveRolesOnMute", false);
/// <summary>
/// Controls whether or not a guild member's roles are returned if he/she leaves and then joins back.
/// </summary>
/// <remarks>Roles will not be returned if the member left the guild because of /ban or /kick.</remarks>
public static readonly BoolOption ReturnRolesOnRejoin = new("ReturnRolesOnRejoin", false);
public static readonly BoolOption AutoStartEvents = new("AutoStartEvents", false);
/// <summary>
/// Controls whether or not users who try to hoist themselves should be renamed.
/// </summary>
public static readonly BoolOption RenameHoistedUsers = new("RenameHoistedUsers", false);
/// <summary>
/// Controls what channel should all public messages be sent to.
/// </summary>
public static readonly SnowflakeOption PublicFeedbackChannel = new("PublicFeedbackChannel");
/// <summary>
/// Controls what channel should all private, moderator-only messages be sent to.
/// </summary>
public static readonly SnowflakeOption PrivateFeedbackChannel = new("PrivateFeedbackChannel");
/// <summary>
/// Controls what channel should welcome messages be sent to.
/// </summary>
public static readonly SnowflakeOption WelcomeMessagesChannel = new("WelcomeMessagesChannel");
public static readonly SnowflakeOption EventNotificationChannel = new("EventNotificationChannel");
public static readonly SnowflakeOption DefaultRole = new("DefaultRole");
public static readonly SnowflakeOption MuteRole = new("MuteRole");
public static readonly SnowflakeOption ModeratorRole = new("ModeratorRole");
public static readonly SnowflakeOption EventNotificationRole = new("EventNotificationRole");
/// <summary>
/// Controls the amount of time before a scheduled event to send a reminder in <see cref="EventNotificationChannel" />.
/// </summary>
public static readonly TimeSpanOption EventEarlyNotificationOffset = new(
"EventEarlyNotificationOffset", TimeSpan.Zero);
}