Ask coding questions

← Back to all posts
Discord.py Status
Benjo989 (2)

hi, I don't know what's wrong on my activity code (it doesn't work on my bot.)

async def on_ready():activity = discord.Game(name="replit", type = 3) await bot.change_presence(status = discord.Status.idle, activity = activity)
print("Bot is ready!")

https://replit.com/@Benjo989/myDiscordpy

Comments
hotnewtop
cuber1515 (56)

@Benjo989 so the link to you code is not loading and when you typed out the code it's hard to understand since you didn't use proper spacing; next time take a screen shot or type it out with the proper spacing and indentation. Now to answer your question it looks like in that code your trying to get it to tell you in the console when the bot is online to do this type:

@client.event
async def on_ready():
	print('Bot is ready!')

If this doesn't help then you can check out my post; here I have a website tutorial along with a bot you can fork and check out (and at the bottom of the website there are links to other websites that teach how to program bots)

Hope this helps!!!