From 6fb872f52d87326f81c22efa6ca3ff4290e369b7 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 5 Aug 2018 23:36:48 +0200 Subject: [PATCH] int --- discordbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discordbot.py b/discordbot.py index d6052ddb..6caf52dc 100644 --- a/discordbot.py +++ b/discordbot.py @@ -44,7 +44,7 @@ config.read("config.ini") # Radio messages radio_messages = ["https://www.youtube.com/watch?v=3-yeK1Ck4yk&feature=youtu.be"] radio_messages_enabled = False -radio_message_in = config["Discord"]["radio_messages_every"] +radio_message_in = int(config["Discord"]["radio_messages_every"]) class DurationError(Exception): @@ -367,7 +367,7 @@ async def cmd_play(channel: discord.Channel, author: discord.Member, params: typ radio_message_in -= 1 if radio_message_in <= 0: radio_message = random.sample(radio_messages, 1)[0] - radio_message_in = config["Discord"]["radio_messages_every"] + radio_message_in = int(config["Discord"]["radio_messages_every"]) await add_video_from_url(radio_message) await client.send_message(channel, f"✅ Aggiunto un messaggio radio, disattiva con `!radiomessages off`.") # Parse the parameter as URL