Vous permet d'installer un bot sur telegram. Vous pouvez retrouver le fichier d'exemple (chatbot.py) que vous pouvez modifier à votre guise.
La documentation de python telegram bot
Pour récupérer un token, vous devez créer un bot sur Telegram
Allez sur votre profile dans github et générer facilement un token
Dans cette exemple, le token pour ce bot permet de se connecter à l'API de GitHub sans avoir de limitation sur le nombre de requête.
$ sudo yunohost app install https://github.com/YunoHost-Apps/telegram_chatbot_ynh.git
$ sudo yunohost app upgrade --verbose telegram_chatbot -u https://github.com/YunoHost-Apps/telegram_chatbot_ynh.git
sudo systemctl restart telegram_chatbot.service
Pour vérifier que votre bot fonctionne bien, allez sur le bot Telegram que vous avez crée précédemment et taper coucou, le bot doit vous répondre. Quelques autres mots peuvent être tapés comme par exemple Bière ;)
Vous pouvez également recherche les applications YunoHost qui ont le plus d'étoiles en tapant ynh mopidy libresonic ynh libresonic sonerezh. Bien entendu ce bot est un peu stupid, comparer ce qui est comparable. Nous pouvons comparer Mastodon et Nextcloud ynh mastodon nextcloud, mais ça n'a pas beaucoup de sens car ses deux applications n'ont pas les mêmes usages.
Bref ! A vous de jouer !! ;)
Install your bot on telegram. You can find the example file (chatbot.py) that you can edit as you wish.
Documentation python telegram bot
For create a token, you must create a bot on Telegram
Go on your profile in github and easily generate a token
In this example, the token for this bot is used to connect to the GitHub API without limiting the number of requests.
$ sudo yunohost app install https://github.com/YunoHost-Apps/telegram_chatbot_ynh.git
$ sudo yunohost app upgrade --verbose telegram_chatbot -u https://github.com/YunoHost-Apps/telegram_chatbot_ynh.git
sudo systemctl restart telegram_chatbot.service
To verify that your bot works well, go to the Telegram bot that you created earlier and type coucou, the bot must respond. Some other words can be writed as for example Bière;)
You can also search for YunoHost applications that have the most stars by typing ynh mopidy libreonic. Of course this bot is stupid, compare what is comparable. We can compare Mastodon and Nextcloud ynh mastodon nextcloud, but it does not make much sense because its two applications do not have the same uses.
Sorry for people who speak English. This bot respond only in French.
Enjoy! Happy to play !! ;)