1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-29 18:49:53 +03:00

style: Option -> GuildOption

This commit is contained in:
Octol1ttle 2024-05-16 18:18:25 +05:00
parent 3e6240f4b8
commit a1816a9ac1
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
8 changed files with 14 additions and 14 deletions

View file

@ -29,13 +29,13 @@ namespace TeamOctolings.Octobot.Commands;
public class SettingsCommandGroup : CommandGroup
{
/// <summary>
/// Represents all options as an array of objects implementing <see cref="IOption" />.
/// Represents all options as an array of objects implementing <see cref="IGuildOption" />.
/// </summary>
/// <remarks>
/// WARNING: If you update this array in any way, you must also update <see cref="AllOptionsEnum" /> and make sure
/// that the orders match.
/// </remarks>
private static readonly IOption[] AllOptions =
private static readonly IGuildOption[] AllOptions =
[
GuildSettings.Language,
GuildSettings.WelcomeMessage,
@ -199,7 +199,7 @@ public class SettingsCommandGroup : CommandGroup
}
private async Task<Result> EditSettingAsync(
IOption option, string value, GuildData data, Snowflake channelId, IUser executor, IUser bot,
IGuildOption option, string value, GuildData data, Snowflake channelId, IUser executor, IUser bot,
CancellationToken ct = default)
{
var setResult = option.Set(data.Settings, value);
@ -270,7 +270,7 @@ public class SettingsCommandGroup : CommandGroup
}
private async Task<Result> ResetSingleSettingAsync(JsonNode cfg, IUser bot,
IOption option, CancellationToken ct = default)
IGuildOption option, CancellationToken ct = default)
{
var resetResult = option.Reset(cfg);
if (!resetResult.IsSuccess)