-
Notifications
You must be signed in to change notification settings - Fork 0
Implement base telegram bot #9
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a base Telegram bot framework with state management, message queuing, and routing capabilities. The implementation provides a modular architecture for handling Telegram updates with filtering, middleware support, and localization.
Key changes:
- Finite State Machine (FSM) implementation for managing user states with Redis backend
- Priority-based message queue system for handling outbound messages
- Router system with filters and middleware support for processing messages and callback queries
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| yatgbot/fsm/fsm.go | Core FSM interface and Redis-backed storage implementation |
| yatgbot/fsm/userfsm.go | User-specific FSM storage wrapper |
| yatgbot/localizer/localizer.go | Localization system with JSON-based language files |
| yatgbot/messagequeue/heap.go | Priority heap implementation for message queuing |
| yatgbot/messagequeue/queue.go | Message queue dispatcher with worker pool |
| yatgbot/router/dispatcher.go | Update dispatching logic with filter checking |
| yatgbot/router/filter.go | Filter implementations for routing decisions |
| yatgbot/router/middlewares.go | Middleware chaining system |
| yatgbot/router/router.go | Main router implementation with dependency injection |
| yatgbot/router/schema.go | Data structures for handler context |
| yatgbot/router/updates.go | Update handler bindings for Telegram dispatcher |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
brizzinck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also make a documentation and tests for each package!! Fix LINT!!! And pls make API in root directory, i don't like internal packages
Also improve file structure
|
@Olderestin Check all the previous conversations and resolve those |

This implementation includes:
fsmmessage_queuerouters:filtersmiddlewareshandle
messageandcallbackqueryupdates