Why is my code not working?
@bot.event
async def on_ready():
print('Bot is now working!')
await bot.change_presence(activity=discord.CustomActivity(name='Custom status' ,emoji='🖥️'))
And gives me an error.
Ignoring exception in on_ready
Traceback (most recent call last):
File "/home/runner/.local/share/virtualenvs/python3/lib/python3.7/site-packages/discord/client.py", line 270, in _run_event
await coro(*args, **kwargs)
File "main.py", line 30, in on_ready
await bot.change_presence(activity=discord.CustomActivity(name='Custom status' ,emoji='🖥️'))
AttributeError: module 'discord' has no attribute 'CustomActivity'
How fix is error?
I'm late to the party, WayToDoor is right, bots can't use custom status, I found that they "can use it" but it's invisible except bots can see it's a custom status and you will see "custom status" on the bot profile.
There is Playing, Watching, Listening to, and Streaming available for the bots no problem
You also now have an option to use "Competing in" too, which has type 5. I can't see it on the docs yet so I'm assuming it's not implemented yet.
#this is how "Competing in" is set.
discord.Activity(name="Test", type=5)
this should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With