Fix channel heating (level 0 channel name)
This commit is contained in:
@@ -81,7 +81,7 @@ class FlanaDiscBot(DiscordBot, FlanaBot):
|
|||||||
if channel.members:
|
if channel.members:
|
||||||
heating_context.heat_level += 0.5
|
heating_context.heat_level += 0.5
|
||||||
else:
|
else:
|
||||||
if heating_context.heat_level == -1:
|
if heating_context.heat_level == constants.HEAT_FIRST_LEVEL:
|
||||||
return
|
return
|
||||||
|
|
||||||
heating_context.heat_level -= 0.5
|
heating_context.heat_level -= 0.5
|
||||||
@@ -92,7 +92,7 @@ class FlanaDiscBot(DiscordBot, FlanaBot):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
i = int(heating_context.heat_level)
|
i = int(heating_context.heat_level)
|
||||||
if i == -1:
|
if i == constants.HEAT_FIRST_LEVEL:
|
||||||
n_fires = 0
|
n_fires = 0
|
||||||
new_name = channels_data['C'].original_name
|
new_name = channels_data['C'].original_name
|
||||||
elif i < len(constants.DISCORD_HEAT_NAMES):
|
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)
|
await channel_data.channel.edit(name=channel_data.original_name)
|
||||||
channel_data.n_fires = 0
|
channel_data.n_fires = 0
|
||||||
|
|
||||||
heating_context.heat_level = 0.0
|
heating_context.heat_level = constants.HEAT_FIRST_LEVEL
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ CONNECT_4_N_COLUMNS = 7
|
|||||||
CONNECT_4_N_ROWS = 6
|
CONNECT_4_N_ROWS = 6
|
||||||
FLOOD_2s_LIMIT = 2
|
FLOOD_2s_LIMIT = 2
|
||||||
FLOOD_7s_LIMIT = 4
|
FLOOD_7s_LIMIT = 4
|
||||||
|
HEAT_FIRST_LEVEL = -1
|
||||||
HEAT_PERIOD_SECONDS = datetime.timedelta(minutes=15).total_seconds()
|
HEAT_PERIOD_SECONDS = datetime.timedelta(minutes=15).total_seconds()
|
||||||
HELP_MINUTES_LIMIT = 1
|
HELP_MINUTES_LIMIT = 1
|
||||||
INSTAGRAM_BAN_SLEEP = datetime.timedelta(days=1)
|
INSTAGRAM_BAN_SLEEP = datetime.timedelta(days=1)
|
||||||
|
|||||||
Reference in New Issue
Block a user