Skip to content
This repository has been archived by the owner on May 1, 2022. It is now read-only.

feat: basic help message #8

Merged
merged 5 commits into from
Apr 7, 2022
Merged

feat: basic help message #8

merged 5 commits into from
Apr 7, 2022

Conversation

LordOfPolls
Copy link
Member

Re-open of #5 due to unresolvable branch conflict issues.

This is a basic implementation of a help command to tick off one of your points in #3.

Pre-merge utilisation of this is fairly simple

class bot(Snake):
    def __init__(sefl, ...):
        help = HelpCommand(self, show_params=True, ...)
        help.register()

To modify it, pre-merge, i really think just overriding is the way to go. Post merge i would like to introduce some sort of client method to modify help.

This pr is dependant on dev-latest of dis-snake. Specifically NAFTeam/NAFF@af64022

@AstreaTSS
Copy link
Contributor

AstreaTSS commented Apr 6, 2022

Right, fair enough, might as well comment on a few things from the old PR while I'm at it:

  • For the imports, the point is for there to be less work to be done to change things around. Really, the only things that'll need changing are the molter-specific imports.
  • MolterCommand.usage was indeed added in the dev branch... though there was MolterCommand.signature in main.
  • Fair enough on the language thing.
  • attrs may have a cost during initialization, but that only matters when you're importing the library. When you're running it, it has zero cost. Plus, it makes sense here - who cares about the performance of a help command out of all things? I care about the other stuff attrs allows more.
  • The overrides used to completely replace dis-snek's message commands, but now they don't. Even then, there was always the option of not using the overrides and simply not having aliases or subcommand support, so...

As for the pre/post-merge world, yeah, I would like that too. But overall, this looks good! I'll probably briefly test it on my own once I can (might not be for a while) and then merge it in.

@AstreaTSS AstreaTSS mentioned this pull request Apr 6, 2022
@AstreaTSS AstreaTSS added the enhancement New feature or request label Apr 6, 2022
Copy link
Contributor

@AstreaTSS AstreaTSS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for taking so long, life got in the way haha.

Anyways, just two (really one) things to review over that I found while doing basic tests.

molter/help.py Outdated Show resolved Hide resolved
molter/help.py Outdated Show resolved Hide resolved
@AstreaTSS AstreaTSS merged commit 449d380 into NAFTeam:dev Apr 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants