Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added typing to command_utils.py #194

Merged
merged 4 commits into from
Mar 7, 2024
Merged

Added typing to command_utils.py #194

merged 4 commits into from
Mar 7, 2024

Conversation

49Indium
Copy link
Member

@49Indium 49Indium commented Mar 6, 2024

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.

@andrewj-brown
Copy link
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
Copy link
Member Author

49Indium commented Mar 7, 2024

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

Copy link
Member

@andrewj-brown andrewj-brown left a comment

Choose a reason for hiding this comment

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

ezpz

Copy link
Member

@andrewj-brown andrewj-brown left a comment

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"

@andrewj-brown andrewj-brown merged commit 0c38624 into main Mar 7, 2024
3 checks passed
@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