forked from TeamInklings/Octobot
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:
parent
5937fae552
commit
324f455404
1 changed files with 5 additions and 6 deletions
|
@ -68,16 +68,15 @@ public class SettingsCommandGroup : CommandGroup
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A feedback sending result which may or may not have succeeded.
|
/// A feedback sending result which may or may not have succeeded.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
[Command("settingslist")]
|
[Command("listsettings")]
|
||||||
[DiscordDefaultMemberPermissions(DiscordPermission.ManageGuild)]
|
[DiscordDefaultMemberPermissions(DiscordPermission.ManageGuild)]
|
||||||
[DiscordDefaultDMPermission(false)]
|
[DiscordDefaultDMPermission(false)]
|
||||||
[RequireContext(ChannelContext.Guild)]
|
[RequireContext(ChannelContext.Guild)]
|
||||||
[RequireDiscordPermission(DiscordPermission.ManageGuild)]
|
[RequireDiscordPermission(DiscordPermission.ManageGuild)]
|
||||||
[Description("Shows settings list for this server")]
|
[Description("Shows settings list for this server")]
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
public async Task<Result> ExecuteSettingsListAsync(
|
public async Task<Result> ExecuteListSettingsAsync(
|
||||||
[Description("Settings list page")]
|
[Description("Settings list page")] [MinValue(1)]
|
||||||
[MinValue(1)]
|
|
||||||
int page)
|
int page)
|
||||||
{
|
{
|
||||||
if (!_context.TryGetContextIDs(out var guildId, out _, out _))
|
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="setting">The setting to modify.</param>
|
||||||
/// <param name="value">The new value of the setting.</param>
|
/// <param name="value">The new value of the setting.</param>
|
||||||
/// <returns>A feedback sending result which may or may not have succeeded.</returns>
|
/// <returns>A feedback sending result which may or may not have succeeded.</returns>
|
||||||
[Command("settings")]
|
[Command("editsettings")]
|
||||||
[DiscordDefaultMemberPermissions(DiscordPermission.ManageGuild)]
|
[DiscordDefaultMemberPermissions(DiscordPermission.ManageGuild)]
|
||||||
[DiscordDefaultDMPermission(false)]
|
[DiscordDefaultDMPermission(false)]
|
||||||
[RequireContext(ChannelContext.Guild)]
|
[RequireContext(ChannelContext.Guild)]
|
||||||
[RequireDiscordPermission(DiscordPermission.ManageGuild)]
|
[RequireDiscordPermission(DiscordPermission.ManageGuild)]
|
||||||
[Description("Change settings for this server")]
|
[Description("Change settings for this server")]
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
public async Task<Result> ExecuteSettingsAsync(
|
public async Task<Result> ExecuteEditSettingsAsync(
|
||||||
[Description("The setting whose value you want to change")]
|
[Description("The setting whose value you want to change")]
|
||||||
string setting,
|
string setting,
|
||||||
[Description("Setting value")] string value)
|
[Description("Setting value")] string value)
|
||||||
|
|
Reference in a new issue