dolfies / discord.py-self

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

on_ready not working #250

Closed JustRedTTG closed 2 years ago

JustRedTTG commented 2 years ago

Summary

The on_ready is not working

Reproduction Steps

  1. run my code below, use your account token if you will

Code

import discord
client = discord.Client()
token = "token go here"

@client.event
async def on_ready():
    print('We have logged in as {0.user}'.format(client)) # THIS NEVER HAPPENS!

client.run(token)

Expected Results

should warn that the account is ready to be used

Actual Results

selfbot works but the message saying it's ready is never send... I'd like to setup checks once it's logged in

System Information

Checklist

Additional Information

No response

JU5TDIE commented 2 years ago

Are you sure that you are using discord.py-self? According to your system information, it's discord.py

JustRedTTG commented 2 years ago

Are you sure that you are using discord.py-self? According to your system information, it's discord.py

Well I did it for discord.py as it was asked, not discord.py-self. And it is discord.py-self I'm using in my code.

Additionally I found that it does at some point run the on_ready. But it appears either heavily delayed or just a reconnect

dolfies commented 2 years ago

Pass guild_subscription_options=discord.GuildSubscriptionOptions.off() to Client.

JustRedTTG commented 2 years ago

Thanks that fixed the issue

TheOnlyWayUp commented 2 years ago

Are you sure that you are using discord.py-self? According to your system information, it's discord.py

Yes, that's an issue with discord.py-self, #240 and #241 fix it.