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

Make command an abstract class #68

Merged
merged 3 commits into from
Dec 11, 2024
Merged

Conversation

Era-Dorta
Copy link
Collaborator

@Era-Dorta Era-Dorta commented Jun 21, 2024

Command is an abstract class and it's more idiomatic to declare it as such. I spent half an hour chasing an empty named exception because the method of one of my commands was not named handle. With this PR a Command instance raises an error on instantiation, usually when calling the bot.register() function if it is missing the handle method.

@Era-Dorta Era-Dorta merged commit be4a8f0 into filipre:master Dec 11, 2024
2 checks passed
@Era-Dorta Era-Dorta deleted the abstract-command branch December 11, 2024 15:16
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.

1 participant