mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Added thank button
This commit is contained in:
parent
a5b328b822
commit
5963e2cd59
|
@ -75,3 +75,10 @@ def buttons_hook(message: DiscordMessage, metadata: DiscordMessageMetadata, cont
|
||||||
if "undo" in action_buttons:
|
if "undo" in action_buttons:
|
||||||
add_button(message, BUTTON_PREFIX + " undo " + str(change["pageid"]) + " " + str(change["revid"]),
|
add_button(message, BUTTON_PREFIX + " undo " + str(change["pageid"]) + " " + str(change["revid"]),
|
||||||
context.gettext("Undo"), 2, {"id": None, "name": "🔂"})
|
context.gettext("Undo"), 2, {"id": None, "name": "🔂"})
|
||||||
|
if "thank" in action_buttons and context.event != "suppressed":
|
||||||
|
if change["type"] == "log":
|
||||||
|
add_button(message, BUTTON_PREFIX + " thank log " + str(change["logid"]),
|
||||||
|
context.gettext("Thank user"), 3, {"id": None, "name": "👍"})
|
||||||
|
else:
|
||||||
|
add_button(message, BUTTON_PREFIX + " thank rev " + str(change["revid"]),
|
||||||
|
context.gettext("Thank user"), 3, {"id": None, "name": "👍"})
|
||||||
|
|
Loading…
Reference in a new issue