member count in bot status discord.py code example
Example 1: discord bot status python
await bot.change_presence(activity=discord.Game(name="a game"))
await bot.change_presence(activity=discord.Streaming(name="My Stream", url=my_twitch_url))
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name="a song"))
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="a movie"))
Example 2: create a role with discord.py
@client.command(aliases=['make_role'])
@commands.has_permissions(manage_roles=True)
async def create_role(ctx, *, name):
guild = ctx.guild
await guild.create_role(name=name)
await ctx.send(f'Role `{name}` has been created')