From 1e8d64059d39ef3565342e7c135590764de4f8f8 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 28 Nov 2018 21:00:12 +0100 Subject: [PATCH 1/2] Fix bug --- discordbot.py | 3 ++- template_config.ini | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/discordbot.py b/discordbot.py index d4fbb07e..c64aca75 100644 --- a/discordbot.py +++ b/discordbot.py @@ -54,6 +54,7 @@ loop = asyncio.get_event_loop() # Init the config reader config = configparser.ConfigParser() config.read("config.ini") +config = dict(config) # Radio messages radio_messages = ["https://www.youtube.com/watch?v=3-yeK1Ck4yk", @@ -560,7 +561,7 @@ class RoyalDiscordBot(discord.Client): now_playing = self.video_queue[0] try: audio_source = now_playing.create_audio_source() - except FileNotDownloadedError: + except errors.FileNotDownloadedError: continue logger.info(f"Started playing {repr(now_playing)}.") voice_client.play(audio_source) diff --git a/template_config.ini b/template_config.ini index 8d7a40ff..730a6379 100644 --- a/template_config.ini +++ b/template_config.ini @@ -16,6 +16,7 @@ server_id = main_channel = afk_timer = 10 radio_messages_every = 5 +activityreport_sample_time = 600 [Telegram] bot_token = @@ -37,6 +38,3 @@ client_id = client_secret = username = password = - -[Events] -halloween = 0 \ No newline at end of file From a57b2e925c44b0d26d9c23300a95f384b5a4f86a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 28 Nov 2018 23:11:14 +0100 Subject: [PATCH 2/2] solo per proto --- discordbot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discordbot.py b/discordbot.py index c64aca75..1194e3df 100644 --- a/discordbot.py +++ b/discordbot.py @@ -101,7 +101,8 @@ song_special_messages = { "police academy": ":arrow_forward: {song} - freedom.png", "super smash bros. ultimate": ":arrow_forward: Re-awaken the undying light with {song}!", "powerwolf": ":arrow_forward: Spaggia, ma non ti sei un po' stancato di {song}?", - "eurobeat": ":arrow_forward: Nemesis approva la scelta di {song}. Ben fatto, amico." + "eurobeat": ":arrow_forward: Nemesis approva la scelta di {song}. Ben fatto, amico.", + "k/da": ":arrow_forward: You won a free deportation to Korea! Now playing: {song}." } # FFmpeg settings