Adaminfo commited on
Commit
a4321d6
·
verified ·
1 Parent(s): 6c3fb9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -21
app.py CHANGED
@@ -1,32 +1,15 @@
1
  import telebot
2
 
3
- # تۆکنەکەت
4
  API_TOKEN = '8348414728:AAEjH3r-OCM9DcyqmlD_K67MGfvG2u1Up_A'
5
- bot = telebot.TeleBot(Done! Congratulations on your new bot. You will find it at t.me/BejerBot. 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.
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, "سڵاو لە BejerBot! دەقێکی کوردی بنێرە تا بۆت بکەم بە لاتینی.")
24
 
25
  @bot.message_handler(func=lambda message: True)
26
  def translate(message):
27
- text = message.text
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()