Brought up by a discussion in DAPI discord, the docs show an example of registering a command via Nosedrum.Storage.Dispatcher.add_command/4. The way the docs show an example of this only works for a single guild id, and not a list of guild ids. When attempting to use it with a list of guild id's you get an unexpected response, causing issues with pattern matching.
At first I thought I made a mistake when adding the queue_command functionality, but it seems the code that add_command call hits is unrelated. Specifically
|
def handle_call({:add, payload, name, command, guild_id_list}, _from, commands) |
This handle_call overload returns [error_list, response_list], instead of the standard {:ok, res}. I believe this is the correct way of doing things and the docs could simply use an update. Unfortunately this has also highlighted a feature mismatch between add_command and queue_command that I'll open another issue for as I think they're separate discussions.
Brought up by a discussion in DAPI discord, the docs show an example of registering a command via Nosedrum.Storage.Dispatcher.add_command/4. The way the docs show an example of this only works for a single guild id, and not a list of guild ids. When attempting to use it with a list of guild id's you get an unexpected response, causing issues with pattern matching.
At first I thought I made a mistake when adding the queue_command functionality, but it seems the code that add_command call hits is unrelated. Specifically
nosedrum/lib/nosedrum/storage/dispatcher.ex
Line 91 in e4be492
This handle_call overload returns
[error_list, response_list], instead of the standard{:ok, res}. I believe this is the correct way of doing things and the docs could simply use an update. Unfortunately this has also highlighted a feature mismatch between add_command and queue_command that I'll open another issue for as I think they're separate discussions.