Repository navigation
Bytecode command - #207
Bytecode command#207illuminator3 wants to merge 4 commits into
Conversation
|
Not a slash command? Can you quickly elaborate why? |
|
Can you also show a quick example picture of a dialog, so that we can see the resulting message? |
Slashcommands do not yet support multiline messages. Therefore, we have to use "regular" commands for now since multiline support is basically required for code blocks. |
An example interaction: |
Makes sense. What about the "message-id" feature you created for the tag system. I found that pretty cool. Maybe we just use that and then go slash command? |
Imo it'd be pretty annoying to have to do that every time and would also cause issues with the current auto-update editing-system. Once slashcommands support multilines we can use them though. |
Tais993
left a comment
There was a problem hiding this comment.
purgeMessagesById doesn't take a List because Java doesn't allow overloads by generics.
So if anyone was wondering why that design, that's why.
fe9ae4b to
c48c420
Compare
* Initial commit of the bytecode command * Fix sonar violations in BytecodeCommand.java * I forgot to commit the changes in Application.java :pepega: * Change module name from imc -> inmemorycompiler (Request from Zabuzard) * Changed map name to something more self-explanatory (Request from Zabuzard) * Make string constants static (Request from Zabuzard) * Add comments explaining what certain parts do (Request from Zabuzard) * Change parameter name from gevent -> genericEvent (Request from Zabuzard) * Apply spotless * Add error checking (Request from Zabuzard) * Add comment (Request from Zabuzard) * Unwrap asList invocation * Added @NotNull annotations (Request from Zabuzard) * Add error checking (Request from Zabuzard) * Add @NotNull annotations (Request from Zabuzard) * Change rex to e (Request from Zabuzard) * Change toString -> getMessage (Request from Zabuzard) * Use constant instead of a magic value (Request from Zabuzard) * Add @NotNull annotation (Request from Zabuzard) * Add @NotNull annotation (Request from Zabuzard) * Change naming of parameters (Request from Zabuzard) * Change method name from makeCollection -> iterToCollection (Request from Zabuzard) * Improve map name (Request from Zabuzard) * Add @NotNull annotation (Request from Zabuzard) * Add @NotNull annotation (Request from Zabuzard) * Remove cast * Add @NotNull annotation (Request from Zabuzard) * Add @NotNull annotation (Request from Zabuzard) * Add javadoc (Request from Zabuzard) * Add @NotNull annotation (Request from Zabuzard) * Apply spotless * Change parameter name * Make use of TextChannel#purgeMessagesById (Request from Tijs) * Pass initial capacity to ArrayList constructor (Request from Tijs) * Use LongStream in combination with purgeMessagesById * Forgot to remove the outdated code * Follow naming convention for constants and add javadoc * Use `ListenerAdapter` and dedicated event methods * Map to string (+ spotless) * Add the @NotNull annotation everywhere (Request from Zabuzard) * Use array generator instead of creating a new array (Request from Zabuzard) * Made requested changes * Forgot NotNull's * Apply spotless * Add NotNull annotations * Change field name * Use already present constant * Use isEmpty instead of checking for size == 0 * Expand javadoc * Change method name * Add comment * Use already present classes to achieve the same thing * Applied spotless * Make daddy CodeQL happy OwO * Put comment above return * Clean up code * Change public to private * Don't declare fields on the same line * Exclude reflection sonar rule * Change array creation to object cast * Rename method parameters * Don't declare fields in the "same" line * Move suppression of sonarcloud warning to class level * Use method reference instead of creating a new array * Apply spotless * tijs is cute * still had this in here from debugging * make daddy sonarcloud happy * oh spotless wasn't done yet while I was committing 💀 * it's the future baby * lmao shit doesn't even compile * fuck you spotless * Update application/src/main/java/org/togetherjava/tjbot/commands/bytecode/BytecodeCommand.java Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com> * jingle bells batman smells * Revert "jingle bells batman smells" This reverts commit b91b3a5. * add syntax highlighting * requested changes * spotless * Merge branch 'develop' into feature/bytecode-command Co-authored-by: illuminator3 <hardt-j@web.de> Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
c48c420 to
545c1a7
Compare
|
SonarCloud Quality Gate failed. |
|
|
||
| private static MessageEmbed createResponse(String content) { | ||
| // Rust highlighting looks decent for bytecode | ||
| CodeFence resultCodeFence = new CodeFence("rust", content); |
There was a problem hiding this comment.
Maybe extract "rust" to a field?
|
Im still on it. |
|
why did u reopen it, are u planning to work on it right now? otherwise, just keep it closed (it wont be deleted) |
|
This PR is being closed due to inactivity, can be opened later if need be. |










Adds a code action that allows viewing the bytecode of Java code. The code has to compile for this to work.
Checklist