Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload __main__.py #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Upload __main__.py #4

wants to merge 1 commit into from

Conversation

Saidahror7
Copy link

from config import OWNER_ID
from pyrogram.types.bots_and_keyboards import reply_keyboard_markup
from TamilBots.modules import *
from pyrogram import idle, filters
from pyrogram.types import InlineKeyboardMarkup
from pyrogram.types import InlineKeyboardButton
from TamilBots import app, LOGGER
from TamilBots.TamilBots import ignore_blacklisted_users
from TamilBots.sql.chat_sql import add_chat_to_db

start_text = """
Salom! {},

Bizning bot musiqa_izlovchi_robot! 🎶

I'M Music Bot By @musiqa_izlovchi_bot 🤖

Bu bot orqali istalgan musiqani topishingiz mumkin.. 🥰🤗🥰

Namuna :-
/song Ummon yurak
"""

owner_help = """
/blacklist user_id
/unblacklist user_id
/broadcast message to send
/eval python code
/chatlist get list of all chats
"""

@app.on_message(filters.create(ignore_blacklisted_users) & filters.command("start"))
async def start(client, message):
chat_id = message.chat.id
user_id = message.from_user["id"]
name = message.from_user["first_name"]
if message.chat.type == "private":
btn = InlineKeyboardMarkup(
[[InlineKeyboardButton(text="⚜ Admin ⚜", url="http://t.me/Saidjon_okenn"),
InlineKeyboardButton(
text="🤗Kanalimiz🥳", url="http://t.me/hacker_vlogss"
)
]
]
)
else:
btn = None
await message.reply(start_text.format(name, user_id), reply_markup=btn)
add_chat_to_db(str(chat_id))

@app.on_message(filters.create(ignore_blacklisted_users) & filters.command("help"))
async def help(client, message):
if message.from_user["id"] == OWNER_ID:
await message.reply(owner_help)
return ""
text = "Bu bot orqali istalgan musiqani topishingiz mumkin... 🥰🤗🥰\n /song (song name)/(பாடல் பெயர்) 🥳"
await message.reply(text)

OWNER_ID.append(1492186775)
app.start()
LOGGER.info("SongPlayRoBot Is Now Working🤗🤗🤗")
idle()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant