1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
This commit is contained in:
Steffo 2018-08-05 23:36:48 +02:00
parent 62e9ff620c
commit 6fb872f52d

View file

@ -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