diff --git a/flanabot/bots/flana_disc_bot.py b/flanabot/bots/flana_disc_bot.py index 99be01a..c502a69 100644 --- a/flanabot/bots/flana_disc_bot.py +++ b/flanabot/bots/flana_disc_bot.py @@ -81,7 +81,7 @@ class FlanaDiscBot(DiscordBot, FlanaBot): if channel.members: heating_context.heat_level += 0.5 else: - if heating_context.heat_level == -1: + if heating_context.heat_level == constants.HEAT_FIRST_LEVEL: return heating_context.heat_level -= 0.5 @@ -92,7 +92,7 @@ class FlanaDiscBot(DiscordBot, FlanaBot): continue i = int(heating_context.heat_level) - if i == -1: + if i == constants.HEAT_FIRST_LEVEL: n_fires = 0 new_name = channels_data['C'].original_name elif i < len(constants.DISCORD_HEAT_NAMES): @@ -219,4 +219,4 @@ class FlanaDiscBot(DiscordBot, FlanaBot): await channel_data.channel.edit(name=channel_data.original_name) channel_data.n_fires = 0 - heating_context.heat_level = 0.0 + heating_context.heat_level = constants.HEAT_FIRST_LEVEL diff --git a/flanabot/constants.py b/flanabot/constants.py index dff783e..29131d2 100644 --- a/flanabot/constants.py +++ b/flanabot/constants.py @@ -13,6 +13,7 @@ CONNECT_4_N_COLUMNS = 7 CONNECT_4_N_ROWS = 6 FLOOD_2s_LIMIT = 2 FLOOD_7s_LIMIT = 4 +HEAT_FIRST_LEVEL = -1 HEAT_PERIOD_SECONDS = datetime.timedelta(minutes=15).total_seconds() HELP_MINUTES_LIMIT = 1 INSTAGRAM_BAN_SLEEP = datetime.timedelta(days=1)