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 DSL, simplified polling logic, code cleanup #1

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

Conversation

lamba92
Copy link

@lamba92 lamba92 commented Dec 26, 2023

Changes:

  • Most of the polling logic has been replaced with coroutine code.
  • Added TelegramBotUpdateBuilder DSL to build the bot
  • Exposed TelegramBotApiClient's properties to allows custom extension
  • Simplified TelegramBotApiClient's HttpClient defaults
  • Replaced sealed classes with sealed interfaces
  • Added logger and json to TelegramBotApiContext
  • Removed @OptIn annotations
  • Expanded star imports for code readability outside IDE
  • bump library versions
  • bump gradle wrapper version

kotlinx-serialization = "1.5.1"
ktor = "2.3.2"
log4j = "2.20.0"
kotlinTarget = "1.9.20"
Copy link
Owner

Choose a reason for hiding this comment

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

❌ Let's not bump the target version of Kotlin without an explicit reason.

I also updated the dependency versions in a separate PR (#2), so let's remove the version updates from this one

Changes:
- Most of the polling logic has been replaced with coroutine code.
- Added TelegramBotUpdateBuilder DSL to build the bot
- Exposed TelegramBotApiClient's properties to allows custom extension
- Simplified TelegramBotApiClient's HttpClient defaults
- Replaced sealed classes with sealed interfaces
- Added logger and json to TelegramBotApiContext
- Removed @OptIn annotations
- Expanded star imports for code readability outside IDE
- bump library versions
- bump gradle wrapper version
- `startPolling` now uses `supervisorScope` to allow parallel execution of updates
- better error logging when handling updates
- TelegramBotApiContext is now a class, no need to have an interface for 3 parameters
- dump new Kotlin APIs
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