I'm new at bot creating so sry if quesrion is stupid
Bot showing incorrect number of servers(showing 0) when starting 1 code but when starting 2 code it shows correctly, how to change 1 code that it will show correctly help pls
status = cycle( [f' on { len(client.guilds) } servers', '~help'] )
@tasks.loop( seconds = 5 )
async def changeStatus():
await client.change_presence( activity = discord.Activity( type = discord.ActivityType.playing, name = next(status) ) )
@client.event
async def on_ready():
print( 'bot connected' )
changeStatus.start()
---------------------------------------------------------------------------------------------------------
@client.event
async def on_ready():
print( 'bot connected')
await client.change_presence( activity = discord.Game( f' on { len(client.guilds) } servers | ~help ') )
Workin code but it isn't updating 5 sec if someone need help with updating check another my questions
async def changeStatus():
status = cycle( [f' on { len(client.guilds) } servers', '~help'] )
await client.change_presence( activity = discord.Activity( type = discord.ActivityType.playing, name = next(status) ) )
@client.event
async def on_ready():
print( 'bot connected' )
changeStatus.start()
See Question&Answers more detail:os