fix await head

This commit is contained in:
deflax 2024-01-17 18:18:30 +02:00
parent 687910053e
commit 20f6c43274

View file

@ -72,7 +72,8 @@ async def time(ctx):
@bot.command(name='now', help='Displays whats playing right now') @bot.command(name='now', help='Displays whats playing right now')
async def now(ctx): async def now(ctx):
await ctx.channel.send(query_playhead()) head = await query_playhead()
await ctx.channel.send(head)
# Helper functions # Helper functions
async def query_playhead(): async def query_playhead():
@ -84,7 +85,7 @@ async def query_playhead():
else: else:
logger_discord.error('Cannot connect to the playhead!') logger_discord.error('Cannot connect to the playhead!')
head_name = playhead['name'] head_name = playhead['name']
prio_name = playhead['prio'] head_prio = playhead['prio']
return f'Now playing {head_name} with prio {head_prio}' return f'Now playing {head_name} with prio {head_prio}'
async def query_database(): async def query_database():