![]() ![]() when you want to test the component against a mock Telegram API.Ĭ-error-handlerĪllows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.Ĭan be used to set an alternative base URI, e.g. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. The default Telegram authorization token to be used when the information is not provided in the endpoints.Ĭ-enabled It gets converted automatically into a OutgoingTextMessageĬ-token It requires the CamelTelegramMediaType header to be set to the appropriate media type To send information about a venue (sendVenue) To stop updating a live location message sent by the bot or via the bot (for inline bots) before live_period expires (stopMessageLiveLocation) To send changes to a live location (editMessageLiveLocation) To delete a message, including service messages. To edit only the reply markup of message. ![]() ![]() To edit animation, audio, document, photo, or video messages. To edit captions of messages (editMessageCaption) To edit text and game messages (editMessageText) Screen -x tg_bot ctrl+c python3.7 bot.To send a file to a chat (any media type) To restart the bot you need to go into the Press CTRL + A + D and in this way we exit screen If everything is fine you should see “starting” sudo apt install screen screen -S tg_bot cd cd grin/grin-wallet python3.7 bot.py TOKEN = “1056341881:AAEKYEkс-QVtKIмtzSgIFL06ahUIOnkPemo” Here is the bot token that you receive from botFather password = ‘generate password’ Here is the password for the grin-wallet admin_id = Here is your telegram ID from grin_pass_api = ‘zijvVcc6GH5BYgznbR6K’ Enter the contents of the file here /root/.grin/main/.api_secretĪfter that we save the changed script on the server: Start ssh. Next, move the bot.py file to grin/grin-wallet and picture grin.png Open file bot.py and change: Install some required packages that are needed to build Telegram bot from source: python3.7 -m pip install aiogram python3.7 -m pip install asyncio python3.7 -m pip install requests Pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6) To check if Pip Installs Packages is installed and ready to use, run the commands below: pip3 -version Python 3.7.3 Install pip sudo apt install python3-pip () sudo apt update sudo apt install software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa sudo apt install python3.7 python3.7 -version You should see an output similar to the one below: ![]() To test if Python is installed and ready to use, run the commands below: python3.7 -version Replace the #8 with the number of CPU cores on your system for faster build time… My machine has 8 CPU core, so I use the make command with -j 8 option: make -j 8 sudo make altinstall Next start the building process using the make command. To get these packages installed, run the commands below: sudo apt update sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wgetĪfter installing the above packages, go and download the latest release’s source code from the Python download page after downloading the package, run the commands below extract the file and install: curl -O tar -xf Python-3.7.3.tar.xz cd Python-3.7.3. You can install Grin wallet python- telegram-bot with: debian:īefore installing Python from its source code, you must first install some required packages that are needed to build Python from source. ![]()
0 Comments
Leave a Reply. |