fix: add missing option names/descriptions

This commit is contained in:
sam 2024-10-29 22:18:30 +01:00
parent a34b5479c0
commit c28f987240
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
2 changed files with 13 additions and 4 deletions

View file

@ -76,7 +76,10 @@ public class KeyRoleCommands(
[Command("add")] [Command("add")]
[Description("Add a new key role.")] [Description("Add a new key role.")]
public async Task<IResult> AddKeyRoleAsync( public async Task<IResult> AddKeyRoleAsync(
[Description("The role to add.")] [DiscordTypeHint(TypeHint.Role)] Snowflake roleId [Option("role")]
[Description("The role to add.")]
[DiscordTypeHint(TypeHint.Role)]
Snowflake roleId
) )
{ {
var (_, guildId) = contextInjection.GetUserAndGuild(); var (_, guildId) = contextInjection.GetUserAndGuild();
@ -98,7 +101,10 @@ public class KeyRoleCommands(
[Command("remove")] [Command("remove")]
[Description("Remove a key role.")] [Description("Remove a key role.")]
public async Task<IResult> RemoveKeyRoleAsync( public async Task<IResult> RemoveKeyRoleAsync(
[Description("The role to remove.")] [DiscordTypeHint(TypeHint.Role)] Snowflake roleId [Option("role")]
[Description("The role to remove.")]
[DiscordTypeHint(TypeHint.Role)]
Snowflake roleId
) )
{ {
var (_, guildId) = contextInjection.GetUserAndGuild(); var (_, guildId) = contextInjection.GetUserAndGuild();

View file

@ -47,7 +47,10 @@ public class WatchlistCommands(
{ {
[Command("add")] [Command("add")]
[Description("Add a user to the watchlist.")] [Description("Add a user to the watchlist.")]
public async Task<IResult> AddAsync(IUser user, string reason) public async Task<IResult> AddAsync(
[Description("The user to add")] IUser user,
[Description("The reason for adding this user to the watchlist")] string reason
)
{ {
var (userId, guildId) = contextInjectionService.GetUserAndGuild(); var (userId, guildId) = contextInjectionService.GetUserAndGuild();
@ -59,7 +62,7 @@ public class WatchlistCommands(
[Command("remove")] [Command("remove")]
[Description("Remove a user from the watchlist.")] [Description("Remove a user from the watchlist.")]
public async Task<IResult> RemoveAsync(IUser user) public async Task<IResult> RemoveAsync([Description("The user to remove")] IUser user)
{ {
var (userId, guildId) = contextInjectionService.GetUserAndGuild(); var (userId, guildId) = contextInjectionService.GetUserAndGuild();
if (!await watchlistRepository.RemoveEntryAsync(guildId, user.ID)) if (!await watchlistRepository.RemoveEntryAsync(guildId, user.ID))