Closed ivysochyn closed 1 year ago
As the project grows more functions and scenarios are added to the telegrambot subpackage and code becomes look like a spaghetti one.
telegrambot
The task is to refactor the telegrambot/telegram.bot and following files of the subpackage:
telegrambot/telegram.bot
msg.go
callback-query.go
search.go
errors.go
bot.Send(msg)
telegrambot.go
All the functions should be documented so it's easy to navigate through the package in the documentation.
Changes were merged in #24
As the project grows more functions and scenarios are added to the
telegrambot
subpackage and code becomes look like a spaghetti one.The task is to refactor the
telegrambot/telegram.bot
and following files of the subpackage:msg.go
- should contain all the logic for processing message scenarios.callback-query.go
- should contain all the logic for processing callbacks (e.g. from buttons).search.go
- may contain logic on processing search-related stuff (list all the searches and so on...).errors.go
- should contain methods for processing general errors (e.g. frombot.Send(msg)
).telegrambot.go
- general logic of the bot.All the functions should be documented so it's easy to navigate through the package in the documentation.