Benutzer-Werkzeuge

Webseiten-Werkzeuge


projekte:kommunikation:geotestbot

Dies ist eine alte Version des Dokuments!


Telegram & Dokuwiki

https://www.dokuwiki.org/plugin:tgnotify

Installiert mit Konfiguration

  • API-Token: 5755797455:AAG1thd0vSE78kQ-2eWryMxdJ1MF5G3z1lM
  • „chat_id“:„288639434“
  • Enabled Seitenveränderungen
  • Disabled Debugmode

BLM_Geotest_Bot SFN-Laptop2 itbstelebot V1.42 ChatIDs

5755797455:AAG1thd0vSE78kQ-2eWryMxdJ1MF5G3z1lM

  1. 288639434 Stefan_aus_Berlin
  2. 7731700710 iPhone
  3. 195738062 ud
  4. 5718036975 c80

dl3hw_bot ibwatelebot V1.42 ChatIDs

8146165091:AAG6a7ah8VfxXB9qcP4BOnNnUs8haMPf5As

  1. /bot5755797455:* * * * * *
  2. 7731700710 iPhone

GeoTest2024_bot

Geotest2025_bot

t.me/BotTalk t.me/BotFather

BLM_Geotest_Bot

Done! Congratulations on your new bot. You will find it at t.me/BLM_Geotest_Bot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.

Use this token to access the HTTP API: 5755797455:AAG1thd0vSE78kQ-2eWryMxdJ1MF5G3z1lM Keep your token secure and store it safely, it can be used by anyone to control your bot.

„chat_id“:„288639434“

For a description of the Bot API, see this page: https://core.telegram.org/bots/api

<Response [200]>
{
'ok': True, 
'result': []
}
stefan@itbsSynology:/volume1/SynologyProgDaten$ ./telegrambotcode.py 
<Response [200]>
{
'ok': True, 
'result': [{
           'update_id': 257038103, 
           'message': {
                      'message_id': 4, 
                      'from': {
                              'id': 288639434, 
                              'is_bot': False, 
                              'first_name': 'Stefan', 
                              'last_name': 'aus Berlin', 
                              'username': 'Stefan_aus_Berlin', 
                              'language_code': 'de'
                              }, 
                      'chat': {
                              'id': 288639434, 
                              'first_name': 
                              'Stefan', 
                              'last_name': 'aus Berlin', 
                              'username': 'Stefan_aus_Berlin', 
                              'type': 'private'
                              }, 
                      'date': 1667831275, 
                      'text': 'cool'
                      }
           }
         ]
}

botgetupdates

Eine hervorgehobene Textbox
#!/usr/bin/env python3
 
import requests
import json
import datetime
import sys
from pprint import pprint
 
 
with open("GeoTestToken.txt") as file:
    token = file.read()
 
answer = requests.get(f"https://api.telegram.org/bot{token}/getUpdates")
#if answer=="<Response [200]>":
if answer.status_code == 200:
	content = answer.content
	data = json.loads(content)
	pprint(data)
 
 
zeit = datetime.datetime.now()
name = sys.argv[0][2:-3]
print(name,zeit)
params = {"chat_id":"288639434", "text":f"{name} Skript ausgeführt"}
url = f"https://api.telegram.org/bot{token}/sendMessage"
message = requests.post(url, params=params)
/volume1/web/dokuwiki/data/attic/projekte/kommunikation/geotestbot.1758120045.txt.gz · Zuletzt geändert: 2025/09/17 16:40 von itbs