Replies: 2 comments 2 replies
-
Repeatedly spamming Discord servers with useless requests (including, but not limited to constantly changing your activities/status) can pretty easily get your bot ratelimited. If you see something other bots do it doesn't mean this a good practice or fine to do. If they dont get ratelimited that doesn't mean they won't in the future, neither it means you won't get ratelimited. My advice is: if you really want to have some sort of changing status bar, make it long and separate with some char like Also, you can wrap your code inside triple backticks for it to be properly formatted and possibly highlighted. See GitHub's article on this. |
Beta Was this translation helpful? Give feedback.
-
this code is for a private bot, it's not a public bot. all the more so this activity can be erased without consequences, or chatGPT to help. I try to help people in some way so that no one is soared because of these bots and codes) |
Beta Was this translation helpful? Give feedback.
-
@bot.event
async def on_ready():
print(f"Bot {bot.user} ready worked")
async def change_status():
await bot.wait_until_ready()
while not bot.is_closed():
await bot.change_presence(activity=disnake.Activity(type=disnake.ActivityType.watching, name="#watching"))
await asyncio.sleep(10)#cd
await bot.change_presence(activity=disnake.Activity(type=disnake.ActivityType.listening, name="listening"))
await asyncio.sleep(10)#cd
await bot.change_presence(activity=disnake.Activity(type=disnake.ActivityType.listening, name="listening"))
await asyncio.sleep(10)#cd
await bot.change_presence(activity=disnake.Activity(type=disnake.ActivityType.playing, name="playning"))
await asyncio.sleep(10)#cd
await bot.change_presence(activity=disnake.Activity(type=disnake.ActivityType.streaming, name="streaming"))
await asyncio.sleep(10) #cd
bot.loop.create_task(change_status())
#disnake.py
Beta Was this translation helpful? Give feedback.
All reactions