1
0
mirror of https://gitlab.com/akasroua/covot synced 2025-05-01 19:21:12 +02:00
covot/src/bot.py

24 lines
691 B
Python

from telethon import TelegramClient, events
from telethon.sessions import StringSession
from constants import API_ID, API_HASH, BOT_TOKEN, SESSION
bot = TelegramClient(StringSession(SESSION), API_ID, API_HASH).start(
bot_token=BOT_TOKEN
)
@bot.on(events.NewMessage(pattern="/start"))
async def start(event):
await event.respond(
"Hola, muy buenas. Gracias por ponerte en contacto con UGR Tracing Bot. Para poder continuar con el proceso por favor responda a este mensaje con un identificador único (DNI o correo institucional). Muchas gracias."
)
raise events.StopPropagation
def main():
bot.run_until_disconnected()
if __name__ == "__main__":
main()