OmegaDevStudio / Selfcord-Old

A discord selfbot API wrapper.
MIT License
38 stars 18 forks source link

Variable Scope #15

Closed MildThrone closed 1 year ago

MildThrone commented 1 year ago

In bot.py, the Bot class uses a "user" member but that's assigned only in the "runner" function so is inaccessible in other functions where referenced (ie. get_guild) image

Shell1010 commented 1 year ago

I've not found this issue myself, in the sense I can access the user instance in my testing, even though I get this error myself. I guess I can initialise self.user in the init to help tackle this?

I do this in the code.

self.user: Client = Client(data)

Where self is referring to the class instance, not the runner function.

Join this server if you want where we may communicate. https://discord.gg/VTm26arz9Z

MildThrone commented 1 year ago

i did see that in the code but it still returned an AttributeError