Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5956

Discord.py update voice channel with Aternos server status

$
0
0

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.


Viewing all articles
Browse latest Browse all 5956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>