Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

YunoHost-Apps/telegram_chatbot_ynh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram chatbot for YunoHost

Integration level

Latest Version Status Dependencies GitHub license Yunohost version GitHub issues

Telegram chatbot c'est quoi ?

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

Créer un token pour votre bot telegram

Pour récupérer un token, vous devez créer un bot sur Telegram

Créer un token Github

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.

Installation

$ sudo yunohost app install https://github.com/YunoHost-Apps/telegram_chatbot_ynh.git

Mise à jour

$ sudo yunohost app upgrade --verbose telegram_chatbot -u https://github.com/YunoHost-Apps/telegram_chatbot_ynh.git

Relancer le service

sudo systemctl restart telegram_chatbot.service

Après l'installation

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 !! ;)

What Telegram chatbot?

Install your bot on telegram. You can find the example file (chatbot.py) that you can edit as you wish.

Documentation python telegram bot

Create a telegram token for your bot

For create a token, you must create a bot on Telegram

Create Github token

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.

Install

$ sudo yunohost app install https://github.com/YunoHost-Apps/telegram_chatbot_ynh.git

Upgrade

$ sudo yunohost app upgrade --verbose telegram_chatbot -u https://github.com/YunoHost-Apps/telegram_chatbot_ynh.git

Restart service

sudo systemctl restart telegram_chatbot.service

After install

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 !! ;)