From 3227d52ab6a510ee9b64eb47b5b90bc236a175c7 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 3 Jan 2019 14:17:44 +0100 Subject: [PATCH] Update config.ini --- discordbot.py | 4 ++-- template_config.ini | 47 ++++++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/discordbot.py b/discordbot.py index 28ec1314..184d0afd 100644 --- a/discordbot.py +++ b/discordbot.py @@ -424,13 +424,13 @@ class RoyalDiscordBot(discord.Client): # Defined in the YoutubeDLVideo class # Max videos to predownload try: - self.max_videos_to_predownload = int(config["Video"]["cache_size"]) + self.max_videos_to_predownload = int(config["Discord"]["video_cache_size"]) except (KeyError, ValueError): logger.warning("Max videos to predownload is not set, setting it to infinity.") self.max_videos_to_predownload = None # Max time to ready a video try: - self.max_video_ready_time = int(config["Video"]["max_ready_time"]) + self.max_video_ready_time = int(config["Discord"]["max_ready_time"]) except (KeyError, ValueError): logger.warning("Max time to ready a video is not set, setting it to infinity. ") self.max_video_ready_time = math.inf diff --git a/template_config.ini b/template_config.ini index ffb95820..00807e6c 100644 --- a/template_config.ini +++ b/template_config.ini @@ -2,18 +2,6 @@ # Database URI in the SQLAlchemy format; a PostgreSQL database is suggested, but others _may_ work too database_uri = postgres:// -[Steam] -# Steam Developer API key, can be obtained at https://steamcommunity.com/dev/apikey -api_key = - -[League of Legends] -# Riot Games Developer API key, can be obtained at https://developer.riotgames.com/, requires a registered project -riot_api_key = - -[Osu!] -# osu! API key, can be obtained at https://osu.ppy.sh/p/api -ppy_api_key = - [Discord] # Discord bot token, obtained at https://discordapp.com/developers/applications/ bot_token = @@ -25,16 +13,10 @@ main_channel = afk_timer = 30 # Time in between two activity reports (viewable at https://ryg.steffo.eu/activity) activityreport_sample_time = 600 - -[Telegram] -# Telegram bot token, obtainable at https://t.me/BotFather -bot_token = -# Telegram main group id, where errors should be reported -main_group = - -[Video] +# Enable song text easter eggs? +song_text_easter_eggs_enabled = True # Maximum videos in queue to predownload -cache_size = 5 +video_cache_size = 5 # Maximum time a video may take to become ready (download time) before being removed from the queue max_ready_time = 30 # Enable radio messages? @@ -42,9 +24,11 @@ radio_messages_enabled = False # Number of videos between two radio messages radio_messages_every = 5 -[Sentry] -# Sentry error-reporting token obtainable at https://sentry.io -token = +[Telegram] +# Telegram bot token, obtainable at https://t.me/BotFather +bot_token = +# Telegram main group id, where errors should be reported +main_group = [Flask] # Secret key, used to encrypt cookies @@ -60,3 +44,18 @@ username = # Bot password password = +[Steam] +# Steam Developer API key, can be obtained at https://steamcommunity.com/dev/apikey +api_key = + +[League of Legends] +# Riot Games Developer API key, can be obtained at https://developer.riotgames.com/, requires a registered project +riot_api_key = + +[Osu!] +# osu! API key, can be obtained at https://osu.ppy.sh/p/api +ppy_api_key = + +[Sentry] +# Sentry error-reporting token obtainable at https://sentry.io +token =