· 6 years ago · Dec 25, 2019, 08:28 AM
1import subprocess
2import html
3import json
4import random
5import time
6import pyowm
7import re
8from pyowm import timeutils, exceptions
9from random import randint
10from datetime import datetime
11from typing import Optional, List
12from pythonping import ping as ping3
13from typing import Optional, List
14from PyLyrics import *
15from hurry.filesize import size
16
17import requests
18from telegram import Message, Chat, Update, Bot, MessageEntity
19from telegram import ParseMode, ReplyKeyboardRemove, ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton
20from telegram.ext import CommandHandler, run_async, Filters
21from telegram.utils.helpers import escape_markdown, mention_html
22
23from haruka import dispatcher, OWNER_ID, SUDO_USERS, SUPPORT_USERS, WHITELIST_USERS, BAN_STICKER
24from haruka.__main__ import GDPR
25from haruka.__main__ import STATS, USER_INFO
26from haruka.modules.disable import DisableAbleCommandHandler
27from haruka.modules.helper_funcs.extraction import extract_user
28from haruka.modules.helper_funcs.filters import CustomFilters
29from haruka.modules.rextester.api import Rextester, CompilerError
30from haruka.modules.rextester.langs import languages
31
32from haruka.modules.sql.translation import prev_locale
33
34from haruka.modules.translations.strings import tld
35
36from requests import get
37
38BOT_STRINGS = (
39 "キタワァ*・゜゚・*:.。..。.:*・゜(n‘∀‘)η゚・*:.。. .。.:*・゜゚・* !!!!! oh my god i'm a Bot!!!",
40 "Haan Bsdk Bot hi hun...",
41 "Tera Baap Hoga Bot Gandu",
42 "Tu bss Bot Bot krte reh aur koi aur teri maa chod jaega xD",
43)
44
45RAPE_STRINGS = (
46 "Rape Done Drink The Cum",
47 "The user has been successfully raped",
48 "Dekho Bhaiyya esa hai! Izzat bachailo apni warna Gaand maar lenge tumhari",
49 "Relax your Rear, ders nothing to fear,The Rape train is finally here",
50 "Dont Rape Too much Bsdk.",
51 "Rape coming... Raped! haha :p",
52 "Lodu Andha hai kya Yaha tera rape ho raha hai aur tu abhi tak yahi gaand mara raha hai lulz",
53)
54
55SG_STRINGS = (
56 "Jab desh ke PM ka imaan nahin toh apun sidhe raaste chal ke kya karega",
57)
58
59
60@run_async
61def bot(bot: Bot, update: Update):
62 update.effective_message.reply_text(random.choice(BOT_STRINGS))
63
64
65@run_async
66def pubg(bot: Bot, update: Update):
67 # reply to correct message
68 reply_text = update.effective_message.reply_to_message.reply_text if update.effective_message.reply_to_message else update.effective_message.reply_text
69 reply_text("PUBG Chutiyo ka Game! Be lyk moi Use Tik-Tok and become Chakka")
70
71
72@run_async
73def rape(bot: Bot, update: Update):
74 # reply to correct message
75 reply_text = update.effective_message.reply_to_message.reply_text if update.effective_message.reply_to_message else update.effective_message.reply_text
76 reply_text(random.choice(RAPE_STRINGS))
77
78
79@run_async
80def sg(bot: Bot, update: Update):
81 # reply to correct message
82 reply_text = update.effective_message.reply_to_message.reply_text if update.effective_message.reply_to_message else update.effective_message.reply_text
83 reply_text(random.choice(SG_STRINGS))
84
85
86@run_async
87def runs(bot: Bot, update: Update):
88 chat = update.effective_chat # type: Optional[Chat]
89 update.effective_message.reply_text(random.choice(tld(chat.id, "RUNS-K")))
90
91
92@run_async
93def slap(bot: Bot, update: Update, args: List[str]):
94 chat = update.effective_chat # type: Optional[Chat]
95 msg = update.effective_message # type: Optional[Message]
96
97 # reply to correct message
98 reply_text = msg.reply_to_message.reply_text if msg.reply_to_message else msg.reply_text
99
100 # get user who sent message
101 if msg.from_user.username:
102 curr_user = "@" + escape_markdown(msg.from_user.username)
103 else:
104 curr_user = "[{}](tg://user?id={})".format(msg.from_user.first_name, msg.from_user.id)
105
106 user_id = extract_user(update.effective_message, args)
107 if user_id:
108 slapped_user = bot.get_chat(user_id)
109 user1 = curr_user
110 if slapped_user.username:
111 user2 = "@" + escape_markdown(slapped_user.username)
112 else:
113 user2 = "[{}](tg://user?id={})".format(slapped_user.first_name,
114 slapped_user.id)
115
116 # if no target found, bot targets the sender
117 else:
118 user1 = "[{}](tg://user?id={})".format(bot.first_name, bot.id)
119 user2 = curr_user
120
121 temp = random.choice(tld(chat.id, "SLAP_TEMPLATES-K"))
122 item = random.choice(tld(chat.id, "ITEMS-K"))
123 hit = random.choice(tld(chat.id, "HIT-K"))
124 throw = random.choice(tld(chat.id, "THROW-K"))
125 itemp = random.choice(tld(chat.id, "ITEMP-K"))
126 itemr = random.choice(tld(chat.id, "ITEMR-K"))
127
128 repl = temp.format(user1=user1, user2=user2, item=item, hits=hit, throws=throw, itemp=itemp, itemr=itemr)
129 #user1=user1, user2=user2, item=item_ru, hits=hit_ru, throws=throw_ru, itemp=itemp_ru, itemr=itemr_ru
130
131 reply_text(repl, parse_mode=ParseMode.MARKDOWN)
132
133
134@run_async
135def get_id(bot: Bot, update: Update, args: List[str]):
136 user_id = extract_user(update.effective_message, args)
137 chat = update.effective_chat # type: Optional[Chat]
138 if user_id:
139 if update.effective_message.reply_to_message and update.effective_message.reply_to_message.forward_from:
140 user1 = update.effective_message.reply_to_message.from_user
141 user2 = update.effective_message.reply_to_message.forward_from
142 update.effective_message.reply_text(tld(chat.id,
143 "The original sender, {}, has an ID of `{}`.\nThe forwarder, {}, has an ID of `{}`.").format(
144 escape_markdown(user2.first_name),
145 user2.id,
146 escape_markdown(user1.first_name),
147 user1.id),
148 parse_mode=ParseMode.MARKDOWN)
149 else:
150 user = bot.get_chat(user_id)
151 update.effective_message.reply_text(tld(chat.id, "{}'s id is `{}`.").format(escape_markdown(user.first_name), user.id),
152 parse_mode=ParseMode.MARKDOWN)
153 else:
154 chat = update.effective_chat # type: Optional[Chat]
155 if chat.type == "private":
156 update.effective_message.reply_text(tld(chat.id, "Your id is `{}`.").format(chat.id),
157 parse_mode=ParseMode.MARKDOWN)
158
159 else:
160 update.effective_message.reply_text(tld(chat.id, "This group's id is `{}`.").format(chat.id),
161 parse_mode=ParseMode.MARKDOWN)
162
163
164@run_async
165def info(bot: Bot, update: Update, args: List[str]):
166 msg = update.effective_message # type: Optional[Message]
167 user_id = extract_user(update.effective_message, args)
168 chat = update.effective_chat # type: Optional[Chat]
169
170 if user_id:
171 user = bot.get_chat(user_id)
172
173 elif not msg.reply_to_message and not args:
174 user = msg.from_user
175
176 elif not msg.reply_to_message and (not args or (
177 len(args) >= 1 and not args[0].startswith("@") and not args[0].isdigit() and not msg.parse_entities(
178 [MessageEntity.TEXT_MENTION]))):
179 msg.reply_text(tld(chat.id, "I can't extract a user from this."))
180 return
181
182 else:
183 return
184
185 text = tld(chat.id, "<b>User info</b>:")
186 text += "\nID: <code>{}</code>".format(user.id)
187 text += tld(chat.id, "\nFirst Name: {}").format(html.escape(user.first_name))
188
189 if user.last_name:
190 text += tld(chat.id, "\nLast Name: {}").format(html.escape(user.last_name))
191
192 if user.username:
193 text += tld(chat.id, "\nUsername: @{}").format(html.escape(user.username))
194
195 text += tld(chat.id, "\nUser link: {}\n").format(mention_html(user.id, "link"))
196
197 if user.id == OWNER_ID:
198 text += tld(chat.id, "\n\nAy, This guy is my owner. I would never do anything against him!")
199 else:
200 if user.id in SUDO_USERS:
201 text += tld(chat.id, "\nThis person is one of my sudo users! " \
202 "Nearly as powerful as my owner - so watch it.")
203 else:
204 if user.id in SUPPORT_USERS:
205 text += tld(chat.id, "\nThis person is one of my support users! " \
206 "Not quite a sudo user, but can still gban you off the map.")
207
208 if user.id in WHITELIST_USERS:
209 text += tld(chat.id, "\nThis person has been whitelisted! " \
210 "That means I'm not allowed to ban/kick them.")
211
212 for mod in USER_INFO:
213 mod_info = mod.__user_info__(user.id, chat.id).strip()
214 if mod_info:
215 text += "\n\n" + mod_info
216
217 update.effective_message.reply_text(text, parse_mode=ParseMode.HTML)
218
219@run_async
220def echo(bot: Bot, update: Update):
221 args = update.effective_message.text.split(None, 1)
222 message = update.effective_message
223 if message.reply_to_message:
224 message.reply_to_message.reply_text(args[1])
225 else:
226 message.reply_text(args[1], quote=False)
227 message.delete()
228
229@run_async
230def reply_keyboard_remove(bot: Bot, update: Update):
231 reply_keyboard = []
232 reply_keyboard.append([
233 ReplyKeyboardRemove(
234 remove_keyboard=True
235 )
236 ])
237 reply_markup = ReplyKeyboardRemove(
238 remove_keyboard=True
239 )
240 old_message = bot.send_message(
241 chat_id=update.message.chat_id,
242 text='trying',
243 reply_markup=reply_markup,
244 reply_to_message_id=update.message.message_id
245 )
246 bot.delete_message(
247 chat_id=update.message.chat_id,
248 message_id=old_message.message_id
249 )
250
251
252@run_async
253def gdpr(bot: Bot, update: Update):
254 update.effective_message.reply_text(tld(update.effective_chat.id, "Deleting identifiable data..."))
255 for mod in GDPR:
256 mod.__gdpr__(update.effective_user.id)
257
258 update.effective_message.reply_text(tld(update.effective_chat.id, "send_gdpr"), parse_mode=ParseMode.MARKDOWN)
259
260
261@run_async
262def markdown_help(bot: Bot, update: Update):
263 chat = update.effective_chat # type: Optional[Chat]
264 update.effective_message.reply_text(tld(chat.id, "MARKDOWN_HELP-K"), parse_mode=ParseMode.HTML)
265 update.effective_message.reply_text(tld(chat.id, "Try forwarding the following message to me, and you'll see!"))
266 update.effective_message.reply_text(tld(chat.id, "/save test This is a markdown test. _italics_, *bold*, `code`, "
267 "[URL](example.com) [button](buttonurl:github.com) "
268 "[button2](buttonurl://google.com:same)"))
269
270
271@run_async
272def stats(bot: Bot, update: Update):
273 update.effective_message.reply_text("Current stats:\n" + "\n".join([mod.__stats__() for mod in STATS]))
274
275
276@run_async
277def ping(bot: Bot, update: Update):
278 tg_api = ping3('api.telegram.org', count=4)
279 google = ping3('google.com', count=4)
280 print(google)
281 text = "*Pong!*\n"
282 text += "Average speed to Telegram bot API server - `{}` ms\n".format(tg_api.rtt_avg_ms)
283 if google.rtt_avg:
284 gspeed = google.rtt_avg
285 else:
286 gspeed = google.rtt_avg
287 text += "Average speed to Google - `{}` ms".format(gspeed)
288 update.effective_message.reply_text(text, parse_mode=ParseMode.MARKDOWN)
289
290#def google(bot: Bot, update: Update):
291# query = update.effective_message.text.split(" ",1)
292# result_ = subprocess.run(['gsearch', str(query[1])], stdout=subprocess.PIPE)
293# result = str(result_.stdout.decode())
294# update.effective_message.reply_text('*Searching:*\n`' + str(query[1]) + '`\n\n*RESULTS:*\n' + result, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
295
296
297@run_async
298def github(bot: Bot, update: Update):
299 message = update.effective_message
300 text = message.text[len('/git '):]
301 usr = get(f'https://api.github.com/users/{text}').json()
302 if usr.get('login'):
303 text = f"*Username:* [{usr['login']}](https://github.com/{usr['login']})"
304
305 whitelist = ['name', 'id', 'type', 'location', 'blog',
306 'bio', 'followers', 'following', 'hireable',
307 'public_gists', 'public_repos', 'email',
308 'company', 'updated_at', 'created_at']
309
310 difnames = {'id': 'Account ID', 'type': 'Account type', 'created_at': 'Account created at',
311 'updated_at': 'Last updated', 'public_repos': 'Public Repos', 'public_gists': 'Public Gists'}
312
313 goaway = [None, 0, 'null', '']
314
315 for x, y in usr.items():
316 if x in whitelist:
317 if x in difnames:
318 x = difnames[x]
319 else:
320 x = x.title()
321
322 if x == 'Account created at' or x == 'Last updated':
323 y = datetime.strptime(y, "%Y-%m-%dT%H:%M:%SZ")
324
325 if y not in goaway:
326 if x == 'Blog':
327 x = "Website"
328 y = f"[Here!]({y})"
329 text += ("\n*{}:* {}".format(x, y))
330 else:
331 text += ("\n*{}:* `{}`".format(x, y))
332 reply_text = text
333 else:
334 reply_text = "User not found. Make sure you entered valid username!"
335 message.reply_text(reply_text, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
336
337
338def repo(bot: Bot, update: Update, args: List[str]):
339 message = update.effective_message
340 text = message.text[len('/repo '):]
341 usr = get(f'https://api.github.com/users/{text}/repos?per_page=40').json()
342 reply_text = "*Repo*\n"
343 for i in range(len(usr)):
344 reply_text += f"[{usr[i]['name']}]({usr[i]['html_url']})\n"
345 message.reply_text(reply_text, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
346
347
348LYRICSINFO = "\n[Full Lyrics](http://lyrics.wikia.com/wiki/%s:%s)"
349
350
351@run_async
352def lyrics(bot: Bot, update: Update, args: List[str]):
353 message = update.effective_message
354 text = message.text[len('/lyrics '):]
355 song = " ".join(args).split("- ")
356 reply_text = f'Looks up for lyrics'
357
358 if len(song) == 2:
359 while song[1].startswith(" "):
360 song[1] = song[1][1:]
361 while song[0].startswith(" "):
362 song[0] = song[0][1:]
363 while song[1].endswith(" "):
364 song[1] = song[1][:-1]
365 while song[0].endswith(" "):
366 song[0] = song[0][:-1]
367 try:
368 lyrics = "\n".join(PyLyrics.getLyrics(
369 song[0], song[1]).split("\n")[:20])
370 except ValueError as e:
371 return update.effective_message.reply_text("Song %s not found :(" % song[1], failed=True)
372 else:
373 lyricstext = LYRICSINFO % (song[0].replace(
374 " ", "_"), song[1].replace(" ", "_"))
375 return update.effective_message.reply_text(lyrics + lyricstext, parse_mode="MARKDOWN")
376 else:
377 return update.effective_message.reply_text("Invalid syntax! Try Artist - Song name .For example, Luis Fonsi - Despacito", failed=True)
378
379
380BASE_URL = 'https://del.dog'
381
382
383@run_async
384def paste(bot: Bot, update: Update, args: List[str]):
385 message = update.effective_message
386
387 if message.reply_to_message:
388 data = message.reply_to_message.text
389 elif len(args) >= 1:
390 data = message.text.split(None, 1)[1]
391 else:
392 message.reply_text("What am I supposed to do with this?!")
393 return
394
395 r = requests.post(f'{BASE_URL}/documents', data=data.encode('utf-8'))
396
397 if r.status_code == 404:
398 update.effective_message.reply_text('Failed to reach dogbin')
399 r.raise_for_status()
400
401 res = r.json()
402
403 if r.status_code != 200:
404 update.effective_message.reply_text(res['message'])
405 r.raise_for_status()
406
407 key = res['key']
408 if res['isUrl']:
409 reply = f'Shortened URL: {BASE_URL}/{key}\nYou can view stats, etc. [here]({BASE_URL}/v/{key})'
410 else:
411 reply = f'{BASE_URL}/{key}'
412 update.effective_message.reply_text(reply, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
413
414
415@run_async
416def get_paste_content(bot: Bot, update: Update, args: List[str]):
417 message = update.effective_message
418
419 if len(args) >= 1:
420 key = args[0]
421 else:
422 message.reply_text("Please supply a paste key!")
423 return
424
425 format_normal = f'{BASE_URL}/'
426 format_view = f'{BASE_URL}/v/'
427
428 if key.startswith(format_view):
429 key = key[len(format_view):]
430 elif key.startswith(format_normal):
431 key = key[len(format_normal):]
432
433 r = requests.get(f'{BASE_URL}/raw/{key}')
434
435 if r.status_code != 200:
436 try:
437 res = r.json()
438 update.effective_message.reply_text(res['message'])
439 except Exception:
440 if r.status_code == 404:
441 update.effective_message.reply_text('Failed to reach dogbin')
442 else:
443 update.effective_message.reply_text('Unknown error occured')
444 r.raise_for_status()
445
446 update.effective_message.reply_text('```' + escape_markdown(r.text) + '```', parse_mode=ParseMode.MARKDOWN)
447
448
449@run_async
450def get_paste_stats(bot: Bot, update: Update, args: List[str]):
451 message = update.effective_message
452
453 if len(args) >= 1:
454 key = args[0]
455 else:
456 message.reply_text("Please supply a paste key!")
457 return
458
459 format_normal = f'{BASE_URL}/'
460 format_view = f'{BASE_URL}/v/'
461
462 if key.startswith(format_view):
463 key = key[len(format_view):]
464 elif key.startswith(format_normal):
465 key = key[len(format_normal):]
466
467 r = requests.get(f'{BASE_URL}/documents/{key}')
468
469 if r.status_code != 200:
470 try:
471 res = r.json()
472 update.effective_message.reply_text(res['message'])
473 except Exception:
474 if r.status_code == 404:
475 update.effective_message.reply_text('Failed to reach dogbin')
476 else:
477 update.effective_message.reply_text('Unknown error occured')
478 r.raise_for_status()
479
480 document = r.json()['document']
481 key = document['_id']
482 views = document['viewCount']
483 reply = f'Stats for **[/{key}]({BASE_URL}/{key})**:\nViews: `{views}`'
484 update.effective_message.reply_text(reply, parse_mode=ParseMode.MARKDOWN)
485
486
487@run_async
488def execute(bot: Bot, update: Update, args: List[str]):
489
490 message = update.effective_message
491 text = ' '.join(args)
492 regex = re.search('^([\w.#+]+)\s+([\s\S]+?)(?:\s+\/stdin\s+([\s\S]+))?$', text, re.IGNORECASE)
493
494 if not regex:
495 available_languages = ', '.join(languages.keys())
496 message.reply_text('*The availale languages are:*\n`{}`'.format(available_languages), parse_mode=ParseMode.MARKDOWN)
497 return
498
499 language = regex.group(1)
500 code = regex.group(2)
501 stdin = regex.group(3)
502
503 try:
504 regexter = Rextester(language, code, stdin)
505 except CompilerError as exc: # Exception on empy code or missing output
506 message.reply_text(exc)
507 return
508
509 output = ""
510 output += "*Language:*\n`{}`".format(language)
511 output += "*\n\nSource:*\n`{}`".format(code)
512
513 if regexter.result:
514 output += "*\n\nResult:*\n`{}`".format(regexter.result)
515
516 if regexter.warnings:
517 output += "\n\n*Warnings:*\n`{}`\n".format(regexter.warnings)
518
519 if regexter.errors:
520 output += "\n\n*Errors:*\n'{}`".format(regexter.errors)
521
522 message.reply_text(output, parse_mode=ParseMode.MARKDOWN)
523
524
525def wiki(bot: Bot, update: Update):
526 kueri = re.split(pattern="wiki", string=update.effective_message.text)
527 wikipedia.set_lang("en")
528 if len(str(kueri[1])) == 0:
529 update.effective_message.reply_text("Enter keywords!")
530 else:
531 try:
532 pertama = update.effective_message.reply_text("? Loading...")
533 keyboard = InlineKeyboardMarkup([[InlineKeyboardButton(text="? More Info...", url=wikipedia.page(kueri).url)]])
534 bot.editMessageText(chat_id=update.effective_chat.id, message_id=pertama.message_id, text=wikipedia.summary(kueri, sentences=10), reply_markup=keyboard)
535 except wikipedia.PageError as e:
536 update.effective_message.reply_text(f"⚠ Error: {e}")
537 except BadRequest as et :
538 update.effective_message.reply_text(f"⚠ Error: {et}")
539
540@run_async
541def get_time(bot: Bot, update: Update, args: List[str]):
542 if len(args) == 0:
543 update.effective_message.reply_text("Write a location to check the time.")
544 return
545
546 location = " ".join(args)
547 if location.lower() == bot.first_name.lower():
548 update.effective_message.reply_text("Its always banhammer time for me!")
549 bot.send_sticker(update.effective_chat.id, BAN_STICKER)
550 return
551
552 res = requests.get(GMAPS_LOC, params=dict(address=location))
553
554 if res.status_code == 200:
555 loc = json.loads(res.text)
556 if loc.get('status') == 'OK':
557 bot.sendChatAction(update.effective_chat.id, "typing") # Bot typing before send messages
558 lat = loc['results'][0]['geometry']['location']['lat']
559 long = loc['results'][0]['geometry']['location']['lng']
560
561 country = None
562 city = None
563
564 address_parts = loc['results'][0]['address_components']
565 for part in address_parts:
566 if 'country' in part['types']:
567 country = part.get('long_name')
568 if 'administrative_area_level_1' in part['types'] and not city:
569 city = part.get('long_name')
570 if 'locality' in part['types']:
571 city = part.get('long_name')
572
573 if city and country:
574 location = "{}, {}".format(city, country)
575 elif country:
576 location = country
577
578 timenow = int(datetime.utcnow().timestamp())
579 res = requests.get(GMAPS_TIME, params=dict(location="{},{}".format(lat, long), timestamp=timenow))
580 if res.status_code == 200:
581 offset = json.loads(res.text)['dstOffset']
582 timestamp = json.loads(res.text)['rawOffset']
583 time_there = datetime.fromtimestamp(timenow + timestamp + offset).strftime("%H:%M:%S on %A %d %B")
584 update.message.reply_text("It's {} in {}".format(time_there, location))
585
586@run_async
587def shrug(bot: Bot, update: Update):
588 default_msg = "¯\_(ツ)_/¯"
589 message = update.effective_message
590 if message.reply_to_message:
591 message.reply_to_message.reply_text(default_msg)
592 else:
593 message.reply_text(default_msg)
594
595
596def ud(bot: Bot, update: Update, args):
597 term = ' '.join(args)
598 ud_api = "http://api.urbandictionary.com/v0/define?term=" + term
599 ud_reply = json.loads(requests.get(ud_api).content)['list']
600 if len(args) == 0:
601 update.message.reply_text("USAGE: /ud <Word>")
602 elif len(ud_reply) != 0:
603 ud = ud_reply[0]
604 reply_text = "<b>{0}</b>\n<a href='{1}'>{1}</a>\n<i>By {2}</i>\n\nDefinition: {3}\n\nExample: {4}".format(
605 ud['word'], ud['permalink'], ud['author'], ud['definition'], ud['example'])
606 update.message.reply_text(reply_text, parse_mode='HTML')
607 else:
608 update.message.reply_text("Term not found")
609
610
611
612
613__help__ = """
614 - /id: get the current group id. If used by replying to a message, gets that user's id.
615 - /runs: reply a random string from an array of replies.
616 - /slap: slap a user, or get slapped if not a reply.
617 - /info: get information about a user.
618 - /gdpr: deletes your information from the bot's database. Private chats only.
619 - /markdownhelp: quick summary of how markdown works in telegram - can only be called in private chats.
620 - /git: Returns info about a GitHub user or organization.
621 - /repo: Return the GitHub user or organization repository list (Limited at 40)
622 - /lyrics: Find your favorite songs lyrics!
623 - /paste: Create a paste or a shortened url using [dogbin](https://del.dog)
624 - /getpaste: Get the content of a paste or shortened url from [dogbin](https://del.dog)
625 - /pastestats: Get stats of a paste or shortened url from [dogbin](https://del.dog)
626 - /ud: Type the word or expression you want to search. For example /ud Gay
627 - /removebotkeyboard: Got a nasty bot keyboard stuck in your group?
628 - /exec <language> <code> [/stdin <stdin>]: Execute a code in a specified language. Send an empty command to get the supported languages.
629 - /shrug: try and check it out yourself.
630 - /bot: try and check it out yourself.
631 - /sg: Sacred Games Dialogues.
632 - /time <place>: gives the local time at the given place.
633"""
634
635__mod_name__ = "Misc"
636
637ID_HANDLER = DisableAbleCommandHandler("id", get_id, pass_args=True, admin_ok=True)
638TIME_HANDLER = CommandHandler("time", get_time, pass_args=True)
639PING_HANDLER = DisableAbleCommandHandler("ping", ping, admin_ok=True)
640#GOOGLE_HANDLER = DisableAbleCommandHandler("google", google)
641LYRICS_HANDLER = DisableAbleCommandHandler("lyrics", lyrics, pass_args=True, admin_ok=True)
642
643
644RUNS_HANDLER = DisableAbleCommandHandler("runs", runs, admin_ok=True)
645BOT_HANDLER = DisableAbleCommandHandler("bot", bot, admin_ok=True)
646SG_HANDLER = DisableAbleCommandHandler("sg", sg, admin_ok=True)
647RAPE_HANDLER = DisableAbleCommandHandler("rape", rape, admin_ok=True)
648SHRUG_HANDLER = DisableAbleCommandHandler("shrug", shrug, admin_ok=True)
649PUBG_HANDLER = DisableAbleCommandHandler("pubg", pubg, admin_ok=True)
650SLAP_HANDLER = DisableAbleCommandHandler("slap", slap, pass_args=True, admin_ok=True)
651INFO_HANDLER = DisableAbleCommandHandler("info", info, pass_args=True, admin_ok=True)
652GITHUB_HANDLER = DisableAbleCommandHandler("git", github, admin_ok=True)
653REPO_HANDLER = DisableAbleCommandHandler("repo", repo, pass_args=True, admin_ok=True)
654
655ECHO_HANDLER = CommandHandler("echo", echo, filters=CustomFilters.sudo_filter)
656MD_HELP_HANDLER = CommandHandler("markdownhelp", markdown_help, filters=Filters.private)
657
658STATS_HANDLER = CommandHandler("stats", stats, filters=Filters.user(OWNER_ID))
659GDPR_HANDLER = CommandHandler("gdpr", gdpr, filters=Filters.private)
660EXECUTE_HANDLER = CommandHandler("exec", execute, pass_args=True, filters=CustomFilters.sudo_filter)
661
662PASTE_HANDLER = DisableAbleCommandHandler("paste", paste, pass_args=True)
663GET_PASTE_HANDLER = DisableAbleCommandHandler("getpaste", get_paste_content, pass_args=True)
664PASTE_STATS_HANDLER = DisableAbleCommandHandler("pastestats", get_paste_stats, pass_args=True)
665
666
667dispatcher.add_handler(PASTE_HANDLER)
668dispatcher.add_handler(TIME_HANDLER)
669dispatcher.add_handler(GET_PASTE_HANDLER)
670dispatcher.add_handler(PASTE_STATS_HANDLER)
671dispatcher.add_handler(ID_HANDLER)
672dispatcher.add_handler(RUNS_HANDLER)
673dispatcher.add_handler(BOT_HANDLER)
674dispatcher.add_handler(BOT_HANDLER)
675dispatcher.add_handler(PUBG_HANDLER)
676dispatcher.add_handler(RAPE_HANDLER)
677dispatcher.add_handler(SLAP_HANDLER)
678dispatcher.add_handler(INFO_HANDLER)
679dispatcher.add_handler(ECHO_HANDLER)
680dispatcher.add_handler(SHRUG_HANDLER)
681dispatcher.add_handler(CommandHandler('ud', ud, pass_args=True))
682dispatcher.add_handler(MD_HELP_HANDLER)
683dispatcher.add_handler(STATS_HANDLER)
684dispatcher.add_handler(GDPR_HANDLER)
685dispatcher.add_handler(PING_HANDLER)
686#dispatcher.add_handler(GOOGLE_HANDLER)
687dispatcher.add_handler(GITHUB_HANDLER)
688dispatcher.add_handler(LYRICS_HANDLER)
689dispatcher.add_handler(REPO_HANDLER)
690dispatcher.add_handler(DisableAbleCommandHandler("removebotkeyboard", reply_keyboard_remove))
691dispatcher.add_handler(EXECUTE_HANDLER)