Skip to content

Fix: move initialize flag up in _bot.py - #4733

Merged
Bibo-Joshi merged 5 commits into
masterfrom
initialize_bot_fix
Apr 8, 2025
Merged

Fix: move initialize flag up in _bot.py#4733
Bibo-Joshi merged 5 commits into
masterfrom
initialize_bot_fix

Conversation

@Poolitzer

Copy link
Copy Markdown
Member

I am unsure if I should test this, because I can't really rewrite the initialize, so I think the only appropriate way would be to pick an invalid token, but unsure if this is worth it (its a really short function after all)

@Bibo-Joshi

Copy link
Copy Markdown
Member

@Poolitzer You can mock get_me to raise an exception and mock HTTPXRequest.shutdown to ensure that the shutdown is still called - or at least check that the logging line "This Bot is already shut down. Returning" is not issued.

@Bibo-Joshi

Copy link
Copy Markdown
Member

@Poolitzer what's your status on this? Pleaselet me know if you'd like support.

@Poolitzer

Copy link
Copy Markdown
Member Author

Will do the next days, sorry life happened

@Bibo-Joshi
Bibo-Joshi merged commit ed9496b into master Apr 8, 2025
@Bibo-Joshi
Bibo-Joshi deleted the initialize_bot_fix branch April 8, 2025 17:45
@Bibo-Joshi

Copy link
Copy Markdown
Member

thanks for the fix!

@github-actions github-actions Bot locked and limited conversation to collaborators Apr 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants