dhvcc / forwarding-bot

Migrate your conversation and forward messages from VK to Telegram
https://pypi.org/project/forwarding-bot/
MIT License
4 stars 2 forks source link

Some code issues #11

Closed InspectorDue closed 3 years ago

InspectorDue commented 3 years ago
  1. I think it would be better to rename the variable. forwarding-bot/forwarding_bot/settings.py
    MINSK_TZ = pytz.timezone("Europe/Minsk")
    def minsk_timezone(*args):
    return datetime.now(MINSK_TZ).timetuple()
  2. I guess there's no need to instantiate Bot class forwarding_bot/vk/_blueprint/blueprint.py
    bot = Bot(data_config.bot_token)

    As I know bot = message.bot should work

dhvcc commented 3 years ago
  1. What are your suggestions? Feel free to make PR's
  2. I think you are mistaken this bot instance with VK bot. It is a TG bot instance which needs to make API calls This will be refactored when I will have time Again, I'm open to your PR's :)
InspectorDue commented 3 years ago
  1. Will it be okay if the time zone is set via the Telegram bot? I have a lot of ideas. What about multiple accounts? What about adding accounts via bot? But it's not safe
  2. My mistake.
dhvcc commented 3 years ago

Multiple accounts and multiple convos config is a feature that is not really prioritised right now The main goal is to achieve better code structure and better message handling

Also the timezone here is for logging, not for bots It should be a function as it is requested by logging module The only thing is that this function can be lambda

dhvcc commented 3 years ago

Closed as inactive