Replies: 6 comments 1 reply
-
https://github.com/windkh/node-red-contrib-telegrambot/blob/master/examples/inlinequery.json |
Beta Was this translation helpful? Give feedback.
-
Auto-Answer bezieht sich auf callback_query der mit answerCallbackQuery automatisch beantwortet werden kann. Alternativ kann man das im Flow selbst machen |
Beta Was this translation helpful? Give feedback.
-
Ich gebe zu, ich habe "inline_query", "inline_keyboard" und "custom_keyboard" etwas durcheinander geworfen. Das Beispiel funktioniert! Aber: Ich wollte dann einen Button in die "inline_query" einfügen und habe dann die Doku der README gelesen, nachdem der erste Versuch nicht funktioniert hat. Dort finde ich unter "Issueing API commands", in der Tabelle: msg.payload.type = inline_query Dann soll msg.payload.content = { inlineQueryId (string), results (array of InlineQueryResult) } Das würde für mich dann so aussehen: msg.payload.content.inlineQueryId = "..." msg.payload.content.results = [] Wenn ich das Beispiel aber nicht falsch interpretiere, dann wird dort das Array in msg.payload.results übergeben. Ich bin kein super Entwickler. Ich muss mich weiter an Try&Error entlanghangeln und brauche manchmal eben etwas Hilfe. |
Beta Was this translation helpful? Give feedback.
-
Ich habe jetzt einiges getestet mit inline_query + button. Ergebnis: Wird nur eine inline_query beantwortet, muss das in msg.payload.results stehen. Wird zusätzlich ein Button gesendet, muss das in msg.payload.options.results und msg.payload.options.button stehen! mmh! |
Beta Was this translation helpful? Give feedback.
-
schade - dann habe ich mich wohl nicht gut ausgedrückt. |
Beta Was this translation helpful? Give feedback.
-
So funktioniert eine inline_query:
Das entspricht auch dem Beispiel! So funktioniert eine inline_query mit einem buttton:
Man kann erkennen, dass bei der inline_query die werte für die Query in msg.payload.results stehen. Bei inline_query + button stehen sie aber in msg.payload.options.results. Darauf muss man erst mal kommen!!!! Die Dokumentation sagt, falls ich das nicht falsch interpretiere: Issueing API commandsAdditionally to sending content, the sender node can be used to issue commands direct to the API. In this case the
The | inline_query | { inlineQueryId (string), results (array of InlineQueryResult) } | optional arguments | https://core.telegram.org/bots/api#answerinlinequery | Also sollen die Werte für die inline_query eigentlich in msg.payload.content.results stehen - meine ich! |
Beta Was this translation helpful? Give feedback.
-
Ich bitte um Unterstützung um eine Inline Query hinzubekommen.
Meine Annahme:
Soweit ich die Doku verstanden habe, kann ein Benutzer in irgendeinem Chat (Channel oder Group)
mit "@botName command" eine Inline Query starten.
In NodeRed wird das mit einem Event-Node vom Event "Inline Query" als Eingang aufgefangen.
Ein Beispiel:
Der Debug vom Event zeigt:
Jetzt ist die chatId des Channels oder der Group in dem die Inline Query abgesetzt wurde "undefinded".
Wenn jetzt die Antwortmöglichkeiten geschickt werden, wohin sollen die denn gehen? Die Antwortmöglichkeiten sollen doch da erscheinen, wo die Inline Query angefordert wurde!
An dieser Stelle bin ich etwas verloren!
Kann mir hier jemand aufs Pferd helfen?
Anmerkung:
Ich konnte erfolgreich eine Inline Query erzeugen und senden, wenn der Event ein Command war. In diesem Fall wird über den command-node die chatId mitgeliefert.
Danke
Zusatzfrage: Was bewirkt der Schalter "Auto-Answer"?
Beta Was this translation helpful? Give feedback.
All reactions