-
-
Notifications
You must be signed in to change notification settings - Fork 14
Dev/1.2.3 #33
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
Merged
Merged
Dev/1.2.3 #33
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4dad9c1
фикс типов
ink-developer 1834b41
фикс типов 2
ink-developer bae4476
Добавил загрузку фото профиля
ink-developer c6ab809
Добавил метод для получении информации о чате по ссылке
ink-developer de05a5e
Добавил класс ContactAttach для обработки контактов и обновил Message…
ink-developer 6995648
Сделал нормальные примеры
ink-developer 46d269b
Добавил список контактов
ink-developer b519264
Бамп версии
ink-developer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Potential
IndexErrorwhen accessingcounters[0].Line 46 accesses
reaction_info.counters[0]without verifying that thecounterslist is non-empty. If a reaction change event arrives with an empty counters list, this will raise anIndexError.Since this is example code, consider adding a guard or a comment noting this assumption.
🔎 Suggested fix
@client.on_reaction_change async def handle_reaction_change( message_id: str, chat_id: int, reaction_info: ReactionInfo ) -> None: + counters_info = ( + f"{reaction_info.counters[0].reaction}={reaction_info.counters[0].count}" + if reaction_info.counters + else "none" + ) print( f"Reaction changed on message {message_id} in chat {chat_id}: " f"Total count: {reaction_info.total_count}, " f"Your reaction: {reaction_info.your_reaction}, " - f"Counters: {reaction_info.counters[0].reaction}={reaction_info.counters[0].count}" + f"Counters: {counters_info}" )📝 Committable suggestion
🤖 Prompt for AI Agents