I'm trying to make a discord bot with enables a Aternos server and I'm trying to make a status voice channel, I'm fairly new to this stuff so it might be a simple mistake.
I'm not getting any errors its just not changing the name
import discordfrom discord.ext import commandsfrom python_aternos import Clientatclient = Client()atclient.login_with_session('token')aternos = atclient.accountservs = aternos.list_servers()myserv = servs[0]intents = discord.Intents.default()intents.message_content = Truebot = commands.Bot(command_prefix='>', intents=intents)@bot.command()async def start(ctx): try: myserv.start() await ctx.send("Starting Server") except Exception as e: await ctx.send(f"An error occurred: {e}")@bot.eventasync def update(): while true: sleep(5) channel = client.get_channel(1234638593704726592) myserv.fetch() await channel.edit(name=myserv.status)bot.run('token')
I wanted the update function to have every 5 seconds it gets the status of the server and change the voice channel name but it did nothing.