Update app.py
Browse files
app.py
CHANGED
|
@@ -1,32 +1,15 @@
|
|
| 1 |
import telebot
|
| 2 |
|
| 3 |
-
# ت
|
| 4 |
API_TOKEN = '8348414728:AAEjH3r-OCM9DcyqmlD_K67MGfvG2u1Up_A'
|
| 5 |
-
bot = telebot.TeleBot(
|
| 6 |
-
|
| 7 |
-
Use this token to access the HTTP API:
|
| 8 |
-
8348414728:AAEjH3r-OCM9DcyqmlD_K67MGfvG2u1Up_A
|
| 9 |
-
Keep your token secure and store it safely, it can be used by anyone to control your bot.
|
| 10 |
-
|
| 11 |
-
For a description of the Bot API, see this page: https://core.telegram.org/bots/api)
|
| 12 |
-
|
| 13 |
-
# نەخشەی گۆڕینی پیتەکان
|
| 14 |
-
mapping = {
|
| 15 |
-
'ڵ': 'll', 'ڕ': 'rr', 'چ': 'ch', 'ژ': 'zh', 'ۆ': 'o',
|
| 16 |
-
'ێ': 'e', 'و': 'u', 'ی': 'y', 'گ': 'g', 'ڤ': 'v',
|
| 17 |
-
'پ': 'p', 'ە': 'a', 'خ': 'kh', 'ح': 'h', 'ق': 'q',
|
| 18 |
-
'ش': 'sh', 'ف': 'f', 'ک': 'k', 'ئ': ''
|
| 19 |
-
}
|
| 20 |
|
| 21 |
@bot.message_handler(commands=['start'])
|
| 22 |
def start(message):
|
| 23 |
-
bot.reply_to(message, "سڵاو
|
| 24 |
|
| 25 |
@bot.message_handler(func=lambda message: True)
|
| 26 |
def translate(message):
|
| 27 |
-
|
| 28 |
-
for k, v in mapping.items():
|
| 29 |
-
text = text.replace(k, v)
|
| 30 |
-
bot.reply_to(message, f"ئامادەیە بۆ AI:\n\n`{text}`", parse_mode='Markdown')
|
| 31 |
|
| 32 |
bot.infinity_polling()
|
|
|
|
| 1 |
import telebot
|
| 2 |
|
| 3 |
+
# تەنها کۆدە ژمارەییەکە لێرە دابنێ
|
| 4 |
API_TOKEN = '8348414728:AAEjH3r-OCM9DcyqmlD_K67MGfvG2u1Up_A'
|
| 5 |
+
bot = telebot.TeleBot(API_TOKEN)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
@bot.message_handler(commands=['start'])
|
| 8 |
def start(message):
|
| 9 |
+
bot.reply_to(message, "سڵاو! ئێستا BejerBot بە ڕاستی کار دەکات.")
|
| 10 |
|
| 11 |
@bot.message_handler(func=lambda message: True)
|
| 12 |
def translate(message):
|
| 13 |
+
bot.reply_to(message, f"پەیامەکەت گەیشت: {message.text}")
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
bot.infinity_polling()
|