github-trending icon indicating copy to clipboard operation
github-trending copied to clipboard

Botpress

Open iliyaaaaaa opened this issue 3 months ago • 0 comments

          > ```

`from telegram import Update from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackContext

تابعی برای پاسخ به /start

def start(update: Update, context: CallbackContext): update.message.reply_text('سلام! من دستیار شما هستم.')

تابعی برای پاسخ به پیام‌ها

def echo(update: Update, context: CallbackContext): update.message.reply_text(f'شما گفتید: {update.message.text}')

def main(): # توکن ربات خود را در اینجا قرار دهید updater = Updater("7069976094:AAEi5_Ko08RwePsbuc5nRwES_8oEygra1eY") # <-- توکن API خود را اینجا قرار بدهید

# دریافت دیسپاچری
dispatcher = updater.dispatcher

# اضافه کردن هندلرها
dispatcher.add_handler(CommandHandler("start", start))
dispatcher.add_handler(MessageHandler(Filters.text & ~Filters.command, echo))

# شروع ربات
updater.start_polling()
updater.idle()

if name == 'main': main()#!/usr/bin/python3

import time

t = time.localtime(time.time()) localtime = time.asctime(t) str = "Current Time:" + time.asctime(t)

print(str)`

Originally posted by @iliyaaaaaa in https://github.com/tzpBingo/github-trending/issues/12#issuecomment-2448936250

iliyaaaaaa avatar Oct 31 '24 03:10 iliyaaaaaa