Reputation: 47
Had some issues with checking a user's custom status. When I did it, it would only show the status of the user and not their custom status.
@bot.command()
async def statuscheck(ctx):
for guild in bot.guilds:
for member in guild.members:
print(member.status)
This return returned not the custom status but just the normal status. It would also only return for the bot. Any fixes?
Upvotes: 1
Views: 923
Reputation: 1037
user.activities
returns the all activities of user
and you want to get discord.CustomActivity
.
for activity in user.activities:
if isinstance(activity, discord.CustomActivity): #checking activity is a custom activity
print(activity)
Upvotes: 1