1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 09:09:00 +03:00

Rename settings commands (#94)

This PR renames commands `/settingslist` and `/settings` to
`/listsettings` and `/editsettings` respectively. This helps avoid
confusion and accidental use of the wrong command while conforming to a
common naming style, similar to remind commands.

cc @mctaylors wiki needs updating

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2023-08-22 04:18:58 +05:00 committed by GitHub
parent 5937fae552
commit 324f455404
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,16 +68,15 @@ public class SettingsCommandGroup : CommandGroup
/// <returns>
/// A feedback sending result which may or may not have succeeded.
/// </returns>
[Command("settingslist")]
[Command("listsettings")]
[DiscordDefaultMemberPermissions(DiscordPermission.ManageGuild)]
[DiscordDefaultDMPermission(false)]
[RequireContext(ChannelContext.Guild)]
[RequireDiscordPermission(DiscordPermission.ManageGuild)]
[Description("Shows settings list for this server")]
[UsedImplicitly]
public async Task<Result> ExecuteSettingsListAsync(
[Description("Settings list page")]
[MinValue(1)]
public async Task<Result> ExecuteListSettingsAsync(
[Description("Settings list page")] [MinValue(1)]
int page)
{
if (!_context.TryGetContextIDs(out var guildId, out _, out _))
@ -150,14 +149,14 @@ public class SettingsCommandGroup : CommandGroup
/// <param name="setting">The setting to modify.</param>
/// <param name="value">The new value of the setting.</param>
/// <returns>A feedback sending result which may or may not have succeeded.</returns>
[Command("settings")]
[Command("editsettings")]
[DiscordDefaultMemberPermissions(DiscordPermission.ManageGuild)]
[DiscordDefaultDMPermission(false)]
[RequireContext(ChannelContext.Guild)]
[RequireDiscordPermission(DiscordPermission.ManageGuild)]
[Description("Change settings for this server")]
[UsedImplicitly]
public async Task<Result> ExecuteSettingsAsync(
public async Task<Result> ExecuteEditSettingsAsync(
[Description("The setting whose value you want to change")]
string setting,
[Description("Setting value")] string value)