From 20f6c43274a350004e036d7563bc1451016ba2d0 Mon Sep 17 00:00:00 2001 From: deflax Date: Wed, 17 Jan 2024 18:18:30 +0200 Subject: [PATCH] fix await head --- src/discordbot/discordbot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/discordbot/discordbot.py b/src/discordbot/discordbot.py index 5f82012..49a4197 100644 --- a/src/discordbot/discordbot.py +++ b/src/discordbot/discordbot.py @@ -72,7 +72,8 @@ async def time(ctx): @bot.command(name='now', help='Displays whats playing right now') async def now(ctx): - await ctx.channel.send(query_playhead()) + head = await query_playhead() + await ctx.channel.send(head) # Helper functions async def query_playhead(): @@ -84,7 +85,7 @@ async def query_playhead(): else: logger_discord.error('Cannot connect to the playhead!') head_name = playhead['name'] - prio_name = playhead['prio'] + head_prio = playhead['prio'] return f'Now playing {head_name} with prio {head_prio}' async def query_database():