Skip to content

Commit

Permalink
Fix forgotten queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Dec 18, 2024
1 parent 762036a commit 8f7c0c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected void onButton(ButtonInteractionEvent event, String[] arguments) {
final long userId = Long.parseLong(arguments[1]);
if (arguments[0].equals("cancel")) {
if (!event.getMember().hasPermission(Permission.MODERATE_MEMBERS)) {
event.reply("You cannot use this button!").setEphemeral(true);
event.reply("You cannot use this button!").setEphemeral(true).queue();
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ protected RestAction<?> doSend(MessageCreateData createData) {
*/
private static String getMessageScript(Message msg) {
final String content = msg.getContentRaw().substring((Commands.get().getPrefix() + "eval").length()).trim();
if (content.startsWith("```js")) {
return content.substring("```js".length(), content.lastIndexOf("```")).trim();
if (content.startsWith("```")) {
return content.substring("```".length(), content.lastIndexOf("```")).trim();
} else if (content.startsWith("`")) {
return content.substring(1, content.lastIndexOf('`')).trim();
}
Expand Down

0 comments on commit 8f7c0c6

Please sign in to comment.