question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename chat and user arguments to chat_id and user_id

See original GitHub issue

github_iconTop GitHub Comments

1reaction
Birdi7commented, Jul 3, 2020

Hi @tohabyuraev. Thank you for your interest!

This issue affects all the modules in the framework, including dispatcher.py and storage.py. I am not sure whether there is an effective technique to search, because we need to rename all usages in every module.

I would recommend to do refactoring step by step: that’s not a task which is easy to be done in an evening. Consider opening a draft PR - this way you’ll get the feedback ASAP. Feel free to ping me for any further questions!

1reaction
Birdi7commented, Jul 22, 2019

Additional affected lines, in storage.py:

https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L41-L43 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L63-L66 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L80-L83 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L97-L100 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L113-L116 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L129-L133 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L150-L152 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L165-L168 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L186-L188 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L204-L207 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L221-L224 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L237-L241 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L258-L260 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L275-L277 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L295 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L298 https://github.com/aiogram/aiogram/blob/01f075d905798c8dde04e9ba86a9bb6917ba9e9a/aiogram/dispatcher/storage.py#L301 And a couple one after the last 2 lines, the same as them

Read more comments on GitHub >

github_iconTop Results From Across the Web

Telegram CLI Commands - GitHub Gist
Sets channel about info. Sets channel username info. Prints info about chat (id, members, admin, etc.) Clears all data and exits.
Read more >
How to obtain Telegram chat_id for a specific user?
To get group chat ID, first you have to add the bot to the group, then send /my_id in the group. Here's the...
Read more >
telegram.Chat - python-telegram-bot v20.0b0
Chat(id, type, title=None, username=None, first_name=None, last_name=None, ... The following are now keyword-only arguments in Bot methods: location ...
Read more >
Top 5 Pyrogram Code Examples - Snyk
Parameters : chat_id (``int`` | ``str``): Unique identifier (int) or username (str) of the target chat. Unique identifier for the target chat in...
Read more >
Managing Users - React chat - GetStream.io
Unique Usernames​​ Clients can set a username, by setting the name custom field. The field is optional and by default has no uniqueness...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found