Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# coding=utf-8
import telebot
import requests
import json
bot = telebot.TeleBot("<<TELEGRAM-BOT-TOKEN-CODE>>")
@bot.message_handler(commands=['start'])
def send_welcome(message):
bot.send_message(message.chat.id, "Merhaba {} nasıl yadımcı olabilirim?".format(message.from_user.first_name))
@bot.message_handler(func=lambda message: True)
def echo_all(message):
arg = {'username': '<<CEYD-A-USERNAME>>', 'token': '<<CEYD-A-TOKEN-CODE>>','code': message.text.lower() ,'type':'text'}
cevap = json.loads(requests.post("http://beta.ceyd-a.com/jsonengine.jsp", data=arg).content.decode('utf-8')[1:-3]).get("answer")
bot.send_message(message.chat.id,cevap)
bot.polling()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.