Fix: notifier l'auteur Discord quand un commentaire GitLab est ajouté
This commit is contained in:
parent
91a17acf04
commit
f892a1ceba
1 changed files with 9 additions and 1 deletions
|
|
@ -379,9 +379,17 @@ class BugReport(commands.Cog):
|
|||
is_system = note_attr.get("system", False)
|
||||
|
||||
if not is_system:
|
||||
note_body = note_attr.get("note", "")
|
||||
# GitLab peut envoyer des champs différents selon version/config
|
||||
note_body = (
|
||||
note_attr.get("note")
|
||||
or note_attr.get("body")
|
||||
or payload.get("note", "")
|
||||
or payload.get("object_attributes", {}).get("note", "")
|
||||
or ""
|
||||
)
|
||||
author_name = payload.get("user", {}).get("name", "Développeur")
|
||||
|
||||
|
||||
try:
|
||||
components = [
|
||||
disnake.ui.Container(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue