From 12535e1076d140126cb7da4c9aacb170a93dd039 Mon Sep 17 00:00:00 2001 From: "/v/ (The Corrupted King)" <66529179+TheCorruptedKing@users.noreply.github.com> Date: Wed, 6 Oct 2021 11:14:03 -0400 Subject: [PATCH 1/3] Fixed reaction roles? I have no fucking clue, I just copied and pasted. --- .../corruptedinc/corruptedmainframe/commands/Commands.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt b/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt index e6352db..f1d7042 100644 --- a/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt +++ b/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt @@ -154,10 +154,11 @@ class Commands(val bot: Bot) { )).complete() } - register(CommandData("reactionrole", "description") + register(CommandData("reactionrole", "Adds toggleable reaction roles to a message") .addOption(OptionType.STRING, "message", "Message link", true) - .addOption(OptionType.STRING, "reactions", "Reactions", true)) { event -> - + .addOption(OptionType.STRING, "reactions", "Reactions", true)) + .addOption(OptionType.STRING, "role", "role name", true)) { event -> + // case sensitive assertAdmin(event) val reactionsMap = event.getOption("reactions")!!.asString.removeSurrounding("\"").split(", ") From 99d4d2bd0e67caed05f2caffb986d5b82c6a3798 Mon Sep 17 00:00:00 2001 From: "/v/ (The Corrupted King)" <66529179+TheCorruptedKing@users.noreply.github.com> Date: Wed, 6 Oct 2021 11:18:31 -0400 Subject: [PATCH 2/3] Update Commands.kt --- .../github/corruptedinc/corruptedmainframe/commands/Commands.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt b/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt index f1d7042..acca398 100644 --- a/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt +++ b/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt @@ -158,7 +158,7 @@ class Commands(val bot: Bot) { .addOption(OptionType.STRING, "message", "Message link", true) .addOption(OptionType.STRING, "reactions", "Reactions", true)) .addOption(OptionType.STRING, "role", "role name", true)) { event -> - // case sensitive + // case sensitive because of unpingable roles assertAdmin(event) val reactionsMap = event.getOption("reactions")!!.asString.removeSurrounding("\"").split(", ") From 9e5a7a81d573f18f12dbb29f53e5677f3b962987 Mon Sep 17 00:00:00 2001 From: "/v/ (The Corrupted King)" <66529179+TheCorruptedKing@users.noreply.github.com> Date: Thu, 7 Oct 2021 15:14:58 -0400 Subject: [PATCH 3/3] Update Commands.kt --- .../github/corruptedinc/corruptedmainframe/commands/Commands.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt b/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt index acca398..14999d3 100644 --- a/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt +++ b/bot/src/com/github/corruptedinc/corruptedmainframe/commands/Commands.kt @@ -158,7 +158,7 @@ class Commands(val bot: Bot) { .addOption(OptionType.STRING, "message", "Message link", true) .addOption(OptionType.STRING, "reactions", "Reactions", true)) .addOption(OptionType.STRING, "role", "role name", true)) { event -> - // case sensitive because of unpingable roles + // case sensitive because of unpingable roles. Plan on adding role IDs as an option. assertAdmin(event) val reactionsMap = event.getOption("reactions")!!.asString.removeSurrounding("\"").split(", ")