Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Responding to Events

In this lesson, you’ll modify your code to listen for and then respond to events. An event is something that happens on Discord that you can use to trigger a reaction in your code.

Continuing to build on the previous code you’ve been working with, the on_ready() event handler handles the event that the Client has made a connection to Discord and prepared its response data. So, when Discord fires an event, discord.py will route the event data to the corresponding event handler on your connected Client.

Comments & Discussion

Become a Member to join the conversation.