Skip to content
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

close event #72

Closed
Rxann opened this issue Sep 2, 2021 · 2 comments
Closed

close event #72

Rxann opened this issue Sep 2, 2021 · 2 comments
Labels
feature request New feature request

Comments

@Rxann
Copy link

Rxann commented Sep 2, 2021

Summary

Add a close event

What is the feature request for?

The core library

The Problem

I would like a close event to be implemented because it would make things much easier to when the bot is shutting down. This would be very helpful for things like closing aiohttp Client Sessions and etc.

The Ideal Solution

An event for close would be implemented.

The Current Solution

None

Additional Context

I have heard before that this could be hard to do, but I think it would help a lot of people!

@Rxann Rxann added the feature request New feature request label Sep 2, 2021
@Rxann Rxann changed the title on_close event close event Sep 2, 2021
@Luc1412
Copy link
Contributor

Luc1412 commented Sep 3, 2021

I think that is redundant. Events are used for things you don't know when they will happen. In case of closing the Client you know when it happens. (If you using client.close())

You can either call those actions before you call client.close() or you overwrite the close function.

@Rxann
Copy link
Author

Rxann commented Sep 3, 2021

Oki, Thanks for the response and feedback!

@Rxann Rxann closed this as completed Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants