video-stream/bot/entertainment.py

81 lines
2.8 KiB
Python
Raw Normal View History

2021-09-09 01:18:24 +00:00
# Copyright (C) 2021 By VeezMusicProject
# module by @tofikdn
import requests
from pyrogram import Client
2021-09-12 04:34:43 +00:00
# from config import Veez.BOT_USERNAME
from config import Veez
2021-09-09 01:18:24 +00:00
from helpers.filters import command
2021-09-12 04:34:43 +00:00
@Client.on_message(command(["asupan", f"asupan@{Veez.BOT_USERNAME}"]))
2021-09-09 01:18:24 +00:00
async def asupan(client, message):
try:
resp = requests.get("https://api-tede.herokuapp.com/api/asupan/ptl").json()
results = f"{resp['url']}"
return await client.send_video(message.chat.id, video=results)
except Exception as ex:
await message.reply_text("failed to get asupan from server...")
print(ex)
2021-09-12 04:34:43 +00:00
@Client.on_message(command(["wibu", f"wibu@{Veez.BOT_USERNAME}"]))
2021-09-09 01:18:24 +00:00
async def wibu(client, message):
try:
resp = requests.get("https://api-tede.herokuapp.com/api/asupan/wibu").json()
results = f"{resp['url']}"
return await client.send_video(message.chat.id, video=results)
except Exception as ex:
print(ex)
await message.reply_text("failed to get wibu from server...")
2021-09-12 04:34:43 +00:00
@Client.on_message(command(["chika", f"chika@{Veez.BOT_USERNAME}"]))
2021-09-09 01:18:24 +00:00
async def chika(client, message):
try:
resp = requests.get("https://api-tede.herokuapp.com/api/chika").json()
results = f"{resp['url']}"
return await client.send_video(message.chat.id, video=results)
except Exception as ex:
print(ex)
await message.reply_text("failed to get chika from server...")
2021-09-12 04:34:43 +00:00
@Client.on_message(command(["truth", f"truth@{Veez.BOT_USERNAME}"]))
2021-09-09 01:18:24 +00:00
async def truth(_, message):
try:
resp = requests.get("https://api-tede.herokuapp.com/api/truth-en").json()
results = f"{resp['message']}"
return await message.reply_text(results)
except Exception as ex:
print(ex)
await message.reply_text("something went wrong...")
2021-09-12 04:34:43 +00:00
@Client.on_message(command(["dare", f"dare@{Veez.BOT_USERNAME}"]))
2021-09-09 01:18:24 +00:00
async def dare(_, message):
try:
resp = requests.get("https://api-tede.herokuapp.com/api/dare-en").json()
results = f"{resp['message']}"
return await message.reply_text(results)
except Exception as ex:
print(ex)
await message.reply_text("something went wrong...")
2021-09-12 04:34:43 +00:00
@Client.on_message(command(["lyric", f"lyric@{Veez.BOT_USERNAME}"]))
2021-09-09 01:18:24 +00:00
async def lirik(_, message):
rep = await message.reply_text("🔎 **searching lyrics...**")
try:
if len(message.command) < 2:
await message.reply_text("**give a lyric name too !**")
return
query = message.text.split(None, 1)[1]
resp = requests.get(f"https://api-tede.herokuapp.com/api/lirik?l={query}").json()
result = f"{resp['data']}"
await rep.edit(result)
except Exception as ex:
print(ex)
await rep.edit("**Lyrics not found.** please give a valid song name !")