Skip to content

IV. Events

Tucker edited this page Jan 5, 2022 · 3 revisions

These are automatic events that occur in the stream of data from Discord. When these events occur, an action is taken. This is a list of the events (including any specific rules such as channel or role required), along with their corresponding actions.

on_ready

@bot.event
async def on_ready()

This will activate immediately after the bot goes live. It: creates a status, sets that status, then prints out to console for the developer that ICARUS is now live. This only affects the bot.

on_member_join

@bot.event
async def on_member_join(member)

This will do a few things on a member joining the server:

  1. Give them the "Guest" role
  2. Send a welcome message in the designated chat of a designated content
  3. Check if the user has been logged in any way before, and if they have been flagged, will notify orientation group members of their flag and history in the Discord server

Clone this wiki locally