Skip to content

Conversation

@Zabuzard
Copy link
Member

@Zabuzard Zabuzard commented Jan 5, 2026

Overview

This adds the slash command /message with the following subcommands:

  • raw, the bot shares the raw content of a given message
  • post (and post-with-message), the bot posts the given message in a channel of choice under its own name
  • edit (and edit-with-message), the bot edits a message previously posted under its own name

This is mostly meant for administrative purposes, for example to post official messages like announcements or also rules.

Config Changes ❗

This technically has no config changes but I tagged it so whoever does the release doesnt forget the following:

This PR adds new slashcommands that are intended for administrative use only. Discord permissions should be setup to hide these commands from regular users!

Review

Code-wise it is quite similar to the existing TagManageCommand. Structurally it starts with the setup, then helpers, then the actual flows for each subcommand and last but not least Subcommand as helper enum.

The flows themselves start with parsing their options and then have their logic. JDA makes the queuing a bit annoying as usual but should be understandable mostly. For the sake of being able to treat errors individually and abort the rest-queue in between, there are several queue(...) calls instead of a single pipeline (also see TagManageCommand which handles it in a similar way).

I havent found a fitting package, so I gave it a new one. Not super happy with that choice as its just a single file (for now) but its probably the best approach in this case.

No unit tests for now, but creating some should be relatively straightforward.

Testing impressions

raw

raw

post

post

post failure

post-with-message

post with message

edit

edit

edit failure

edit-with-message

edit with message

edit foreign

Attempting to edit a foreign message:

edit foreign

- raw
- post (and post-with-message)
- edit (and edit-with-message)
@Zabuzard Zabuzard self-assigned this Jan 5, 2026
@Zabuzard Zabuzard requested a review from a team as a code owner January 5, 2026 12:33
@Zabuzard Zabuzard added enhancement New feature or request priority: normal config-changes if your PR contains any changes related to config file labels Jan 5, 2026
SquidXTV
SquidXTV previously approved these changes Jan 5, 2026
@Zabuzard Zabuzard dismissed stale reviews from SquidXTV and marko-radosavljevic via 77379a5 January 5, 2026 14:12
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2026

@Zabuzard Zabuzard merged commit 03baab7 into develop Jan 6, 2026
11 checks passed
@Zabuzard Zabuzard deleted the feature/cmd_message branch January 6, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config-changes if your PR contains any changes related to config file enhancement New feature or request priority: normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants