mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-22 00:44:10 +00:00
add thank button
This commit is contained in:
parent
c376d4bcc7
commit
ce80e15b36
|
@ -613,6 +613,11 @@ async def compact_formatter(action, change, parsed_comment, categories, recent_c
|
|||
else:
|
||||
content = _("Unknown event `{event}` by [{author}]({author_url}), report it on the [support server](<{support}>).").format(event=action, author=author, author_url=author_url, support=settings["support"])
|
||||
action = "unknown"
|
||||
if "thank" in action_buttons and action != "suppressed":
|
||||
if change["type"] == "log":
|
||||
message_buttons.append((BUTTON_PREFIX + " thank log " + str(change["logid"]), _("Thank user"), 3, {"id": None, "name": "👍"}))
|
||||
else:
|
||||
message_buttons.append((BUTTON_PREFIX + " thank rev " + str(change["revid"]), _("Thank user"), 3, {"id": None, "name": "👍"}))
|
||||
message = DiscordMessage("compact", action, message_target[1], content=content, wiki=WIKI_SCRIPT_PATH)
|
||||
for message_button in message_buttons:
|
||||
message.add_button(*message_button)
|
||||
|
|
Loading…
Reference in a new issue