#error running basic cog code for python discord bot
54 messages · Page 1 of 1 (latest)
@molten solstice, you just advanced to level 1 !
ok
yeah i changed it mate
As to the error... sending it might help
i sent to late i was gonna ping adam and see if hed delete but dev portal error
i am
A easy to use Paste site for Minecraft Server logs.
A easy to use Paste site for Minecraft Server logs.
@dense scaffold my bad im using mobile. and the websites not mobile friendly
Is your file definitely called main.py? Because the panel is set to run a file called bot.py
main file is bot.py
my bad
main.py is a sepate bot i dont even want to fuss with.
ah I see the problem, you never actually call your main function in your bot.py
You define it - async def main():
but you never call it
how would i do that when the function is import the seperate file?
@molten solstice, you just advanced to level 2 !
my original code
A easy to use Paste site for Minecraft Server logs.
like this aye?
imma change the token brb
Hmm it seems you don't really understand what the code you're writing is doing
its just supposed to send the ping
im just tryna learn how cogs work
cause my codes aren't organized and they are ugly
but all the explanations online and on github are poorly wrote
What you sent just there, is you calling main() inside of main().
You need the call to it to not be indented at all
What you did was basically saying to Python that When I tell you to "main()", what you need to do is log into the bot, then run main() again
What you should say to python is When I tell you to "main()", you need to log into the bot.
Then, after that, you tell it main()
how would i format this? im just having a bit of trouble understanding how im supposed to format that
Move the line main()all the way to the left
i have no issues with regular code, cogs hurt my head
this is kinda basic python 😄
It's making a function, and calling that function
i didnt wanna ask
cus its simple af
like part 4 in the tutorial.
lmao.
makes me not wanna learn but i just learned alot about writing custom commands for yagpdb but i want to make a discord game
so the very last line
after bot token i move to the far left hand side, it should be on the border?
@dense scaffold maybe i misunderstood what u explained saying
A easy to use Paste site for Minecraft Server logs.
that paste is empty