Skip to content

Commit

Permalink
Make joinwatch deprecation messages clearer, add note command examples
Browse files Browse the repository at this point in the history
  • Loading branch information
FloatingMilkshake committed Dec 1, 2024
1 parent 1a53ff1 commit 2a2b6b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Commands/InteractionCommands/JoinwatchInteractions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ public class JoinwatchSlashCmds
{
[SlashCommand("add", "Watch for joins and leaves of a given user. Output goes to #investigations.")]
public async Task JoinwatchAdd(InteractionContext ctx,
[Option("user", "The user to watch for joins and leaves of.")] DiscordUser _,
[Option("note", "An optional note for context.")] string __ = "")
[Option("user", "The user to watch for joins and leaves of.")] DiscordUser user,
[Option("note", "An optional note for context.")] string note = "")
{
await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command is deprecated and no longer works; all joinwatches have been converted to notes. Please use `/note add` instead, with the `show_on_join_and_leave` option.");
await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command is deprecated and no longer works; all joinwatches have been converted to notes. Please use `/note add` instead, like this: `/note add user:{user.Id} note:{(string.IsNullOrEmpty(note) ? "<context>" : note)} show_on_join_and_leave:True`");
}

[SlashCommand("remove", "Stop watching for joins and leaves of a user.")]
public async Task JoinwatchRemove(InteractionContext ctx,
[Option("user", "The user to stop watching for joins and leaves of.")] DiscordUser user)
{
await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command is deprecated and no longer works; all joinwatches have been converted to notes. Please use `/note remove` instead.");
await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command is deprecated and no longer works; all joinwatches have been converted to notes. Please use `/note delete` instead, like this: `/note delete user:{user.Id} note:<note>`");
}

[SlashCommand("status", "Check the joinwatch status for a user.")]
public async Task JoinwatchStatus(InteractionContext ctx,
[Option("user", "The user whose joinwatch status to check.")] DiscordUser user)
{
await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command is deprecated and no longer works; all joinwatches have been converted to notes. Please use `/note list` or `/note details` instead.");
await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command is deprecated and no longer works; all joinwatches have been converted to notes. Please use `/note list user:{user.Id}` to show all of this user's notes, or `/note details user:{user.Id} note:<note>` for details on a specific note, instead. Notes with \"Show on Join & Leave\" enabled will behave like joinwatches.");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions Commands/Lists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ public async Task ScamCheck(CommandContext ctx, [RemainingText, Description("Dom
[HomeServer, RequireHomeserverPerm(ServerPermLevel.TrialModerator)]
public async Task JoinWatch(
CommandContext ctx,
[Description("The user to watch for joins and leaves of.")] DiscordUser _,
[Description("An optional note for context."), RemainingText] string __ = ""
[Description("The user to watch for joins and leaves of.")] DiscordUser user,
[Description("An optional note for context."), RemainingText] string note = ""
)
{
await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command is deprecated and no longer works; all joinwatches have been converted to notes. Please use `/note add` instead, with the `show_on_join_and_leave` option.");
await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command is deprecated and no longer works; all joinwatches have been converted to notes. To add a note for this user, please use `/note add user:{user.Id} note:{(string.IsNullOrEmpty(note) ? "<context>" : note)} show_on_join_and_leave:True`; to remove one, use `/note delete user:{user.Id} note:<note>`.");
}

[Command("appealblock")]
Expand Down

0 comments on commit 2a2b6b8

Please sign in to comment.