HullSeals / HalpyBOT

The Hull Seals IRC Utility bot, built with Pydle
GNU General Public License v3.0
7 stars 3 forks source link

Update multiple dispatch commands to be able to use caseIDs and co #361

Closed C1701D closed 6 months ago

C1701D commented 6 months ago

The !diversion and !dssa commands are often used for cases but currently don't work with the new case board. While for commands like !dist it is possible to simply use a system or also a Client's name or a case ID, that is not the case for all commands. Updating those commands to be able to use the case board as well would be a significant QoL improvement.

Doing so would also require updating the differentiate() function to be able to work with just a single proveded data point (it was originally designed with it always receiving two in mind). Additionally the @sys_exceptions decorator needs to be updated to give the command handlers the raw args list. At that point it would be easier to also update !landmark and lookup to use the differentiate() function, which should have no negative impact.

C1701D commented 6 months ago

As it turns out the @sys_exceptions decorator does not need to be updated as it's possible to convert the cleaned_sys argument it provided into what differentiate() expects. This means !landmark and !lookup don't need to be updated, though I'd argue it can't hurt to do so anyway.