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

Improvements #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KanTheAstronaut
Copy link

  • Changed admin id from int to long (also in the example) since telegram user ids are not integers
  • Instead of returning null when we can't find a user in RemoveBotAdmin and AddBotAdmin let's return "Unknown user or user is not cached!" (because we are checking the database for the target user) or "You can't add/remove yourself!"
  • Changed "GetTarget" so it returns null instead of returning the source user (which made the null check pointless)
  • Made file logging optional (added an option in DefaultBotOptions and the interface)
  • Made loading default modules optional
  • Made loading addon modules optional
  • Fixed a few typos

Disclaimer: I did not test all of the above changes (only the 1st, 2nd, and 3rd) but none of them should cause any exceptions

Changed admin id from int to long (also in the example) since telegram user ids are not integers
Instead of returning null when we can't find a user in RemoveBotAdmin and AddBotAdmin let's return "Unknown user or user is not cached!" (because we are checking the database for the target user) or "You can't add/remove yourself!"
Changed "GetTarget" so it returns null instead of returning the source user (which made the null check pointless)
Made file logging optional (added an option in DefaultBotOptions and the interface)
Made loading default modules optional
Made loading addon modules optional
Fixed a few typos
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