Skip to content

Comments

Improvements#2

Open
KanTheAstronaut wants to merge 2 commits intoridicoulous:masterfrom
KanTheAstronaut:improved
Open

Improvements#2
KanTheAstronaut wants to merge 2 commits intoridicoulous:masterfrom
KanTheAstronaut:improved

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