convcomp2016: telegram bot api overview

22
TELEGRAM BOT API OVERVIEW https://core.telegram.org/bots/api / [email protected] Top contributor Marco Boretto @github.com/akalongman/php-telegram-bot Founder and Developer @grocerylistbot

Upload: convcomp2016

Post on 14-Apr-2017

306 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Convcomp2016: Telegram Bot API Overview

TELEGRAM BOT API OVERVIEWhttps://core.telegram.org/bots/api

/ [email protected]

Top contributor

Marco Boretto

@github.com/akalongman/php-telegram-bot

Founder and Developer @grocerylistbot

Page 2: Convcomp2016: Telegram Bot API Overview

PRIVATE CHAT

Page 3: Convcomp2016: Telegram Bot API Overview

GROUP / SUPERGROUP CHAT

Page 4: Convcomp2016: Telegram Bot API Overview

INLINE MODE

Page 5: Convcomp2016: Telegram Bot API Overview

CHANNEL ADMIN

Page 6: Convcomp2016: Telegram Bot API Overview

CREARE E CONFIGURARE UN BOTPrivatechat

Non disattivabile

Groupchat

Disattivabile

Inlinemode

Attivabile

Channeladmin

Attiva quando il bot diventaadmin del canale

Page 7: Convcomp2016: Telegram Bot API Overview

LA PRIMA INTERAZIONE DEVEESSERE UMANA

Page 8: Convcomp2016: Telegram Bot API Overview

COMANDI - PRIVATE CHAT

Telegram consiglia di implementare in tutti i bot i comandi: /start, /stop, /settings e /help

Page 9: Convcomp2016: Telegram Bot API Overview

KEYBOARDS - PRIVATE CHATUno degli strumenti piùinteressanti messi adisposizione!Suggeriscono all'utenteuna risposta durante laconversazione

Page 10: Convcomp2016: Telegram Bot API Overview

INOLTRO MESSAGGI - PRIVATE CHATChat id:

Tutti i messaggi sonoinoltrati al bot

c h a t _ i d > 0

Page 11: Convcomp2016: Telegram Bot API Overview

GROUP CHATChat id:

La conversazione avviene tra più utenti e più botPossono essere presenti altri bot: Lo stesso comando può essere eseguito da molti bot

- 1 0 0 0 0 0 0 0 0 0 0 < c h a t _ i d < 0

Page 12: Convcomp2016: Telegram Bot API Overview

COMANDI - GROUP CHAT

I comandi possono essere indirizzati uno specifico bot /command@mybot

Page 13: Convcomp2016: Telegram Bot API Overview

INOLTRO MESSAGGI - GROUP CHATSolo i seguenti messaggi sono

inviati al bot:/ComandiMessaggi ottenutipremendo una keyboardMessaggi inviati con l'entitàForceReply

“È possibile inoltraretutti i messaggi al bot

impostando:PrivacyOff.”

Page 14: Convcomp2016: Telegram Bot API Overview

KEYBOARDS: NON SONO DEI MENÚ

Page 15: Convcomp2016: Telegram Bot API Overview

SUPERGROUP CHATCome un gruppo con più

funzionalità:Fino a 5000 personepossono unirsi al gruppoLink pubblicopersonalizzabile

Tutti i gruppi possonotrasformarsi in supergruppiTransizione irreversibile

telegram.me/supername

Dettagli tecnici: Chat id cambia!!

Message_id indipendenteper ogni supergruppo!

c h a t _ i d < - 1 0 0 0 0 0 0 0 0 0 0

Page 16: Convcomp2016: Telegram Bot API Overview

INLINE BOTIl bot puó esseremenzionato in qualsiasichat senza farne parte:Interessante lacombinazione con le inlinekeyboard..

Page 17: Convcomp2016: Telegram Bot API Overview

TELEGRAM BOT API 2.0 OVERVIEWApril 12, 2016

Page 18: Convcomp2016: Telegram Bot API Overview

INLINE - KEYBOARDIntrodotte per contenere idanni dovuti al pessimoutilizzo delle tastiere(secondo me)Funzionano nelle chat:private, group, supergroupFunzioneranno anche neicanali

Page 19: Convcomp2016: Telegram Bot API Overview

SHARE LOCATION BUTTON

Page 20: Convcomp2016: Telegram Bot API Overview

SHARE CONTACT BUTTON

Page 21: Convcomp2016: Telegram Bot API Overview

TELEGRAM BOT API 2.1 OVERVIEWMay 22, 2016

Nuovi metodi:

leaveChatgetChatMemberCountgetChatAdministratorgetChatMember (creator, administrator, member, le� okicked)

Page 22: Convcomp2016: Telegram Bot API Overview

CONCLUSIONICosa manca:

Mandare messaggi in broadcast senza che il bot siabloccatoMetodi per capire se l'utente ha ancora il bot nella lista deicontattiScaricare la foto di una chat di gruppoMostrare diversi comandi in base alla locazione