Skip to content

Added typing to command_utils.py - #194

Merged
ndrwbrwn merged 4 commits into
mainfrom
utils-typing
Mar 7, 2024
Merged

Added typing to command_utils.py#194
ndrwbrwn merged 4 commits into
mainfrom
utils-typing

Conversation

@49Indium

@49Indium 49Indium commented Mar 6, 2024

Copy link
Copy Markdown
Member

Added types to utils/command_utils.py to slowly help complete #134. I did have to use Any types twice for the decorator. Once is for *args, which seems reasonable. However, I had to also use it for self, which seems to be the easiest solution, given https://stackoverflow.com/a/69528375. I'd like to hear what others think.

I also removed the check for the bot, as the type system recommends that this is no longer necessary.

@ndrwbrwn

ndrwbrwn commented Mar 6, 2024

Copy link
Copy Markdown
Member

complete direction-change: command_utils.py is no longer necessary, as all of the bot's commands use interactions instead (which can be deferred with a "thinking" message as part of Discord's UI, instead of using reactions). The only place it's used is the unimplemented/ folder.

Could you just delete the file instead?

@49Indium

49Indium commented Mar 7, 2024

Copy link
Copy Markdown
Member Author

I had thought about this when I was editing it... should have thought harder

@ndrwbrwn ndrwbrwn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ezpz

@ndrwbrwn ndrwbrwn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

mfw i forget to hit "approve"

@ndrwbrwn
ndrwbrwn merged commit 0c38624 into main Mar 7, 2024
@49Indium
49Indium deleted the utils-typing branch March 7, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants