dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
665 stars 155 forks source link

on_ready function not working #468

Closed heqds closed 1 year ago

heqds commented 1 year ago

Summary

When using on_ready, it just doesn't print anything. My code works fine though.

Reproduction Steps

I just wrote this:

@bot.event async def on_ready() print("Logged in and ready")

Then it printed nothing.

Code

import discord
from discord.ext import commands

OWNER_ID = config['OWNER_ID']
PREFIX = config['PREFIX']
TOKEN = config['TOKEN']

bot = commands.Bot(command_prefix=PREFIX, owner_id=OWNER_ID, self_bot=True)

@bot.event
async def on_ready():
    print('Logged in and ready')

@bot.command()
async def test(ctx)
    await ctx.send("test")

bot.run(TOKEN)

Expected Results

It is expected to print out "Logged in and ready" when it logs into the account.

Actual Results

It is not printing it.

System Information

I have the newest ver of discord.py-self and no other forks or discord installed

Checklist

Additional Information

No response

dolfies commented 1 year ago

"The newest version" means nothing. There are instructions on what to put in the System Information field. Please follow them.

dolfies commented 1 year ago

Closing due to lack of activity.