don't thank suppressed

This commit is contained in:
MarkusRost 2024-07-05 21:43:34 +00:00
parent 0f18965bcd
commit 4f62f9fb7f

View file

@ -75,7 +75,7 @@ def buttons_hook(message: DiscordMessage, metadata: DiscordMessageMetadata, cont
if "undo" in action_buttons and context.event == "edit": if "undo" in action_buttons and context.event == "edit":
add_button(message, BUTTON_PREFIX + " undo " + str(change["pageid"]) + " " + str(change["revid"]), add_button(message, BUTTON_PREFIX + " undo " + str(change["pageid"]) + " " + str(change["revid"]),
action_buttons["undo"], 2, {"id": None, "name": "🔂"}) action_buttons["undo"], 2, {"id": None, "name": "🔂"})
if "thank" in action_buttons: if "thank" in action_buttons and context.event != "suppressed":
if change["type"] == "log": if change["type"] == "log":
add_button(message, BUTTON_PREFIX + " thank log " + str(change["logid"]), add_button(message, BUTTON_PREFIX + " thank log " + str(change["logid"]),
action_buttons["thank"], 3, {"id": None, "name": "👍"}) action_buttons["thank"], 3, {"id": None, "name": "👍"})