question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Register commands manually

See original GitHub issue

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I’m always frustrated when […] I’m deploying my discord bot in the cloud with multiple instances.
Somehow, I made a Redis-based command-ignoring logic so that not every instance handles one request. The problem is that the current registerCommandOptions only supports triggering RegisterCommandService by discord message, so it is hard to suppress every instance registering new commands. This is especially problematic when the removeCommandsBefore flag is on.

Describe the solution you’d like

  1. Expose RegisterCommandService in the DiscordModule and let it trigger by manual (for example, HTTP request by admin, not with discord message such as !deploy)

Describe alternatives you’ve considered if registerCommandOptions.allowFactory support Promise, I can add a ignore logic based on the caching layer(like Redis) so that I can trigger only one (not all of the instances)

Additional context nothing.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ydhncommented, Jul 12, 2022

Thanks for your quick support, @fjodor-rybakov !
I like the way you implemented it. nice.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the register Command - AWS OpsWorks
Use the register command to register instances with AWS OpsWorks Stacks.
Read more >
How to manually register a DLL or OCX file
Answer: · Click Start > All Programs > Accessories and right-click on "Command Prompt" and select "Run as Administrator" OR in the Search...
Read more >
How to use the Regsvr32 tool and ... - Microsoft Support
Regsvr32 is a command-line utility to register and unregister OLE controls, such as DLLs and ActiveX controls in the Windows Registry.
Read more >
Resource - Registering all of your commands automagically!
Today, I am here to show you how you can register all of your commands automagically. It's not very hard and is actually...
Read more >
15.2.2. Registering from the Command Line
The simplest way to register a machine is to pass the register command with the user account information required to authenticate to Customer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found