src/bot.py
async def on_ready():
    ''' run on bot start-up '''
    global TESTING_MODE
    TESTING_MODE = False

    DiscordComponents(bot)
    db.connect()
    db.mutation_query('''
        CREATE TABLE IF NOT EXISTS ta_office_hours (
            guild_id    INT,
            ta          VARCHAR(50),
            day         VARCHAR(4),
            begin_time  DATETIME,
            end_time    DATETIME
        )
    ''')

    db.mutation_query('''
        CREATE TABLE IF NOT EXISTS exams (
            guild_id    INT,
            title       VARCHAR(50),
            desc        VARCHAR(300),
            duration    VARCHAR(15),
            begin_date  DATETIME,
            end_date    DATETIME
        )
    ''')

    db.mutation_query('''
        CREATE TABLE IF NOT EXISTS assignments (
            guild_id    INT,
            title       VARCHAR(50),
            link        VARCHAR(300),
            desc        VARCHAR(300),
            date        DATETIME
        )
    ''')

    db.mutation_query('''
        CREATE TABLE IF NOT EXISTS qna (
            guild_id    INT,
            author       VARCHAR(50),
            answer        VARCHAR(300),
            qnumber      INT
        )
    ''')


    event_creation.init(bot)
    office_hours.init(bot)
    await cal.init(bot)
    print('Logged in as')
    print(bot.user.name)
    print(bot.user.id)
    print('------')
 run on bot start-up 
run on bot start-up
run on bot start - up
async def on_ready():
    global TESTING_MODE
    TESTING_MODE = False
    DiscordComponents(bot)
    db.connect()
    db.mutation_query('''
        CREATE TABLE IF NOT EXISTS ta_office_hours (
            guild_id    INT,
            ta          VARCHAR(50),
            day         VARCHAR(4),
            begin_time  DATETIME,
            end_time    DATETIME
        )
    ''')
    db.mutation_query('''
        CREATE TABLE IF NOT EXISTS exams (
            guild_id    INT,
            title       VARCHAR(50),
            desc        VARCHAR(300),
            duration    VARCHAR(15),
            begin_date  DATETIME,
            end_date    DATETIME
        )
    ''')
    db.mutation_query('''
        CREATE TABLE IF NOT EXISTS assignments (
            guild_id    INT,
            title       VARCHAR(50),
            link        VARCHAR(300),
            desc        VARCHAR(300),
            date        DATETIME
        )
    ''')
    db.mutation_query('''
        CREATE TABLE IF NOT EXISTS qna (
            guild_id    INT,
            author       VARCHAR(50),
            answer        VARCHAR(300),
            qnumber      INT
        )
    ''')
    event_creation.init(bot)
    office_hours.init(bot)
    await cal.init(bot)
    print('Logged in as')
    print(bot.user.name)
    print(bot.user.id)
    print('------')
async def on_ready ( ) : global TESTING_MODE TESTING_MODE = False DiscordComponents ( bot ) db . connect ( ) db . mutation_query ( '''
        CREATE TABLE IF NOT EXISTS ta_office_hours (
            guild_id    INT,
            ta          VARCHAR(50),
            day         VARCHAR(4),
            begin_time  DATETIME,
            end_time    DATETIME
        )
    ''' ) db . mutation_query ( '''
        CREATE TABLE IF NOT EXISTS exams (
            guild_id    INT,
            title       VARCHAR(50),
            desc        VARCHAR(300),
            duration    VARCHAR(15),
            begin_date  DATETIME,
            end_date    DATETIME
        )
    ''' ) db . mutation_query ( '''
        CREATE TABLE IF NOT EXISTS assignments (
            guild_id    INT,
            title       VARCHAR(50),
            link        VARCHAR(300),
            desc        VARCHAR(300),
            date        DATETIME
        )
    ''' ) db . mutation_query ( '''
        CREATE TABLE IF NOT EXISTS qna (
            guild_id    INT,
            author       VARCHAR(50),
            answer        VARCHAR(300),
            qnumber      INT
        )
    ''' ) event_creation . init ( bot ) office_hours . init ( bot ) await cal . init ( bot ) print ( 'Logged in as' ) print ( bot . user . name ) print ( bot . user . id ) print ( '------' )
run on bot start-up
run on bot start - up
''' run on bot start-up '''