Fix quote rolling indeces overflow
This commit is contained in:
2
bot.py
2
bot.py
@@ -763,7 +763,7 @@ def get_quotes_rolling_index(guild_id: int, author: str) -> Optional[int]:
|
||||
rolling_indeces[author] = 0
|
||||
|
||||
index = rolling_indeces[author]
|
||||
rolling_indeces[author] = index + 1
|
||||
rolling_indeces[author] = (index + 1) % len(rolling_indeces)
|
||||
config_set_raw("guild_quotes_rolling_indeces", rolling_indeces, guild=guild_id)
|
||||
return index
|
||||
|
||||
|
||||
Reference in New Issue
Block a user