feat: chain log - #276
Conversation
ewang2002
left a comment
There was a problem hiding this comment.
Looks good! A few things.
-
Clarify what the question is.
Perhaps have the question be "In-Game Name of Key Popper." I was kind of confused when I initially saw it.
-
In the control panel, it might be a good idea to update the instructions (and corresponding button text) to include the Chain log button.
-
I've been getting some of these randomly:
DiscordAPIError: Interaction has already been acknowledged. at RequestHandler.execute (ToogaBooga\node_modules\discord.js\src\rest\RequestHandler.js:350:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async RequestHandler.push (ToogaBooga\node_modules\discord.js\src\rest\RequestHandler.js:51:14) at async ModalSubmitInteraction.reply (ToogaBooga\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:103:5)See if it's related to your addition of the prompts, but otherwise don't worry too much about it.
-
See review comments in code.
| ); | ||
|
|
||
| if (!resObj) { | ||
| (originalMessage as unknown as Message<true>).delete().catch(e => LOGGER.error(`${this._instanceInfo} ${e}`)); |
There was a problem hiding this comment.
Can you leave a comment as to why you're doing all of this casting?
|
|
||
| const BUTTONS = new MessageActionRow(); | ||
| if (!this._vcless) { | ||
| const VC_USERS_BUTTON = new MessageButton() |
There was a problem hiding this comment.
Use camelcase here, or define a constant and import the constant. For what it's worth, AdvancedCollector has a helper function cloneButton that you might find helpful. Use the function to clone the button and then, if needed, assign a new custom ID.
| }, 5 * 60 * 1000); | ||
| } | ||
|
|
||
| private async provideChainLogModal(i: ButtonInteraction<"cached">): Promise<void> { |
There was a problem hiding this comment.
Document what this method does
| const VC_USERS_BUTTON = new MessageButton() | ||
| .setCustomId("chain_log_use_vc") | ||
| .setLabel("Users in VC") | ||
| .setEmoji("🎙️") |
There was a problem hiding this comment.
Maybe define the emoji constant in the EmojiConstants.ts file and then import the constant.
|
|
||
| BUTTONS.addComponents(VC_USERS_BUTTON); | ||
| } | ||
| const SKIP_BUTTON = new MessageButton() |
There was a problem hiding this comment.
Use camelcase here, or define a constant and import the constant. For what it's worth, AdvancedCollector has a helper function cloneButton that you might find helpful. Use the function to clone the button and then, if needed, assign a new custom ID.
| .setCustomId(RaidInstance.UNLOCK_RAID_ID) | ||
| .setStyle("PRIMARY"), | ||
| new MessageButton() | ||
| .setLabel("Chain log") |
There was a problem hiding this comment.
To keep things consistent, change this to Chain Log (capitalize L).


How to chain log:
Closes #188