2023-07-18 15:25:02 +03:00
|
|
|
using Remora.Discord.API.Abstractions.Objects;
|
2024-05-16 18:34:26 +03:00
|
|
|
using TeamOctolings.Octobot.Data.Options;
|
|
|
|
using TeamOctolings.Octobot.Responders;
|
2023-07-18 15:25:02 +03:00
|
|
|
|
2024-05-16 18:34:26 +03:00
|
|
|
namespace TeamOctolings.Octobot.Data;
|
2023-07-18 15:25:02 +03:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Contains all per-guild settings that can be set by a member
|
|
|
|
/// with <see cref="DiscordPermission.ManageGuild" /> using the /settings command
|
|
|
|
/// </summary>
|
2023-08-02 23:51:16 +03:00
|
|
|
public static class GuildSettings
|
|
|
|
{
|
2023-07-18 15:25:02 +03:00
|
|
|
public static readonly LanguageOption Language = new("Language", "en");
|
|
|
|
|
2024-04-08 16:38:03 +03:00
|
|
|
public static readonly PunishmentOption WarnPunishment = new("WarnPunishment", "disabled");
|
2024-03-19 18:46:56 +03:00
|
|
|
|
2023-07-18 15:25:02 +03:00
|
|
|
/// <summary>
|
2024-03-20 14:18:40 +03:00
|
|
|
/// Controls what message should be sent in <see cref="PublicFeedbackChannel" /> when a new member joins the guild.
|
2023-07-18 15:25:02 +03:00
|
|
|
/// </summary>
|
|
|
|
/// <remarks>
|
|
|
|
/// <list type="bullet">
|
|
|
|
/// <item>No message will be sent if set to "off", "disable" or "disabled".</item>
|
2024-03-20 14:18:40 +03:00
|
|
|
/// <item><see cref="Messages.DefaultWelcomeMessage" /> will be sent if set to "default" or "reset".</item>
|
2023-07-18 15:25:02 +03:00
|
|
|
/// </list>
|
|
|
|
/// </remarks>
|
|
|
|
/// <seealso cref="GuildMemberJoinedResponder" />
|
2024-05-16 18:34:26 +03:00
|
|
|
public static readonly GuildOption<string> WelcomeMessage = new("WelcomeMessage", "default");
|
2023-07-18 15:25:02 +03:00
|
|
|
|
2024-03-20 14:18:40 +03:00
|
|
|
/// <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" />
|
2024-05-16 18:34:26 +03:00
|
|
|
public static readonly GuildOption<string> LeaveMessage = new("LeaveMessage", "default");
|
2024-03-20 14:18:40 +03:00
|
|
|
|
2023-07-18 15:25:02 +03:00
|
|
|
/// <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);
|
|
|
|
|
2023-07-24 19:51:05 +03:00
|
|
|
/// <summary>
|
|
|
|
/// Controls whether or not users who try to hoist themselves should be renamed.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly BoolOption RenameHoistedUsers = new("RenameHoistedUsers", false);
|
|
|
|
|
2024-03-19 18:46:56 +03:00
|
|
|
public static readonly IntOption WarnsThreshold = new("WarnsThreshold", 0);
|
|
|
|
|
2023-07-18 15:25:02 +03:00
|
|
|
/// <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");
|
|
|
|
|
2024-03-18 11:42:37 +03:00
|
|
|
/// <summary>
|
|
|
|
/// Controls what channel should welcome messages be sent to.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly SnowflakeOption WelcomeMessagesChannel = new("WelcomeMessagesChannel");
|
|
|
|
|
2023-07-18 15:25:02 +03:00
|
|
|
public static readonly SnowflakeOption EventNotificationChannel = new("EventNotificationChannel");
|
2023-08-02 23:51:16 +03:00
|
|
|
public static readonly SnowflakeOption DefaultRole = new("DefaultRole");
|
|
|
|
public static readonly SnowflakeOption MuteRole = new("MuteRole");
|
2024-03-24 21:29:10 +03:00
|
|
|
public static readonly SnowflakeOption ModeratorRole = new("ModeratorRole");
|
2023-08-02 23:51:16 +03:00
|
|
|
public static readonly SnowflakeOption EventNotificationRole = new("EventNotificationRole");
|
2023-07-18 15:25:02 +03:00
|
|
|
|
|
|
|
/// <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);
|
2024-03-19 18:46:56 +03:00
|
|
|
|
|
|
|
public static readonly TimeSpanOption WarnPunishmentDuration = new(
|
|
|
|
"WarnPunishmentDuration", TimeSpan.Zero);
|
2023-07-18 15:25:02 +03:00
|
|
|
}
|