Show all power level changes for initial event

This commit is contained in:
miruka 2020-07-13 23:54:10 -04:00
parent d4bc87ea88
commit a44d683956

View File

@ -362,7 +362,7 @@ class NioCallbacks:
old = previous.get(default, levels.defaults.users_default) old = previous.get(default, levels.defaults.users_default)
if level != old: if level != old or not previous:
changes.append(f"{default} | {lvl(old)} | {lvl(level)}") changes.append(f"{default} | {lvl(old)} | {lvl(level)}")
# Minimum level to send event changes # Minimum level to send event changes
@ -376,7 +376,7 @@ class NioCallbacks:
levels.defaults.events_default, levels.defaults.events_default,
) )
if level != old: if level != old or not previous:
event_changes.append(f"{ev_type} | {lvl(old)} | {lvl(level)}") event_changes.append(f"{ev_type} | {lvl(old)} | {lvl(level)}")
# User level changes # User level changes
@ -384,7 +384,7 @@ class NioCallbacks:
for user_id, level in levels.users.items(): for user_id, level in levels.users.items():
old = users_previous.get(user_id, levels.defaults.users_default) old = users_previous.get(user_id, levels.defaults.users_default)
if level != old: if level != old or not previous:
user_changes.append(f"{user_id} | {lvl(old)} | {lvl(level)}") user_changes.append(f"{user_id} | {lvl(old)} | {lvl(level)}")
# Gather and format changes # Gather and format changes