From a5480c49d10c2126ea401c2ecfa8b2dfaf87e70d Mon Sep 17 00:00:00 2001
From: ramazanmzeri <95154385+ramazanmzeri@users.noreply.github.com>
Date: Sun, 28 Nov 2021 06:38:17 +0300
Subject: [PATCH] callback.py
ok
---
VCPlayBot/modules/callback.py | 478 ----------------------------------
1 file changed, 478 deletions(-)
delete mode 100644 VCPlayBot/modules/callback.py
diff --git a/VCPlayBot/modules/callback.py b/VCPlayBot/modules/callback.py
deleted file mode 100644
index 031db271..00000000
--- a/VCPlayBot/modules/callback.py
+++ /dev/null
@@ -1,478 +0,0 @@
-# (C) supun-maduraga my best friend for his project on call-music-plus
-
-from pyrogram import Client, filters
-from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton, Chat, CallbackQuery
-from VCPlayBot.helpers.decorators import authorized_users_only
-from VCPlayBot.config import BOT_NAME, BOT_USERNAME, OWNER_NAME, SUPPORT_GROUP, UPDATES_CHANNEL, ASSISTANT_NAME
-from VCPlayBot.modules.play import cb_admin_check
-
-
-@Client.on_callback_query(filters.regex("cbstart"))
-async def cbstart(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""โจ **Welcome user, i'm {query.message.from_user.mention}** \n
-๐ญ **[{BOT_NAME}](https://t.me/{BOT_USERNAME}) ๐ฎ๐น๐น๐ผ๐ ๐๐ผ๐ ๐๐ผ ๐ฝ๐น๐ฎ๐ ๐บ๐๐๐ถ๐ฐ ๐ผ๐ป ๐ด๐ฟ๐ผ๐๐ฝ๐ ๐๐ต๐ฟ๐ผ๐๐ด๐ต ๐๐ต๐ฒ ๐ป๐ฒ๐ ๐ง๐ฒ๐น๐ฒ๐ด๐ฟ๐ฎ๐บ'๐ ๐๐ผ๐ถ๐ฐ๐ฒ ๐ฐ๐ต๐ฎ๐๐ !**
-
-๐ก **๐๐ถ๐ป๐ฑ ๐ผ๐๐ ๐ฎ๐น๐น ๐๐ต๐ฒ ๐๐ผ๐'๐ ๐ฐ๐ผ๐บ๐บ๐ฎ๐ป๐ฑ๐ ๐ฎ๐ป๐ฑ ๐ต๐ผ๐ ๐๐ต๐ฒ๐ ๐๐ผ๐ฟ๐ธ ๐ฏ๐ ๐ฐ๐น๐ถ๐ฐ๐ธ๐ถ๐ป๐ด ๐ผ๐ป ๐๐ต๐ฒ ยป ๐ ๐๐ผ๐บ๐บ๐ฎ๐ป๐ฑ๐ ๐ฏ๐๐๐๐ผ๐ป !**
-
-โ **๐๐ผ๐ฟ ๐ถ๐ป๐ณ๐ผ๐ฟ๐บ๐ฎ๐๐ถ๐ผ๐ป ๐ฎ๐ฏ๐ผ๐๐ ๐ฎ๐น๐น ๐ณ๐ฒ๐ฎ๐๐๐ฟ๐ฒ ๐ผ๐ณ ๐๐ต๐ถ๐ ๐ฏ๐ผ๐, ๐ท๐๐๐ ๐๐๐ฝ๐ฒ /help**
-""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "โ Add me to your Group โ", url=f"https://t.me/{BOT_USERNAME}?startgroup=true")
- ],[
- InlineKeyboardButton(
- "โ How to use Me", callback_data="cbhowtouse")
- ],[
- InlineKeyboardButton(
- "๐ Commands", callback_data="cbcmds"
- ),
- InlineKeyboardButton(
- "๐ Donate", url=f"https://t.me/{OWNER_NAME}")
- ],[
- InlineKeyboardButton(
- "๐ฅ Official Group", url=f"https://t.me/{SUPPORT_GROUP}"
- ),
- InlineKeyboardButton(
- "๐ฃ Official Channel", url=f"https://t.me/{UPDATES_CHANNEL}")
- ],[
- InlineKeyboardButton(
- "๐งช Source Code ๐งช", url="https://github.com/QuennArzoo/VCPlayBot"
- )
- ]
- ]
- ),
- disable_web_page_preview=True
- )
-
-
-@Client.on_callback_query(filters.regex("cbhelp"))
-async def cbhelp(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""๐ก Hello there, welcome to the help menu !
-
-**in this menu you can open several available command menus, in each command menu there is also a brief explanation of each command**
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ Basic Cmd", callback_data="cbbasic"
- ),
- InlineKeyboardButton(
- "๐ Advanced Cmd", callback_data="cbadvanced"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ Admin Cmd", callback_data="cbadmin"
- ),
- InlineKeyboardButton(
- "๐ Sudo Cmd", callback_data="cbsudo"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ Owner Cmd", callback_data="cbowner"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ Fun Cmd", callback_data="cbfun"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ก BACK TO HELP", callback_data="cbguide"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbbasic"))
-async def cbbasic(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""๐ฎ here is the basic commands
-
-๐ง [ GROUP VC CMD ]
-
-- /play (song name) - play song from youtube
-- /ytpplay (song name) - play song directly from youtube
-- /playlist - show the list song in queue
-- /song (song name) - download song from youtube
-- /search (video name)ย - search video from youtube detailed
-- /video (video name)ย - download video from youtube detailed
-- /lyrics - (song name) lyrics scrapper
-
-๐ง [ CHANNEL VC CMD ]
-
-- /cplay - stream music on channel voice chat
-- /cplayer - show the song in streaming
-- /cpause - pause the streaming music
-- /cresume - resume the streaming was paused
-- /cskip - skip streaming to the next song
-- /cend - end the streaming music
-- /admincache - refresh the admin cache
-- /userbotjoin: Invite @{ASSISTANT_NAME} Userbot to your chat
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ก BACK", callback_data="cbhelp"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbadvanced"))
-async def cbadvanced(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""๐ฎ here is the advanced commands
-
-/start (in group) - see the bot alive status
-/reload - reload bot and refresh the admin list
-/admincache - refresh the admin cache
-/ping - check the bot ping status
-/uptime - check the bot uptime status
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ก BACK", callback_data="cbhelp"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbadmin"))
-async def cbadmin(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""๐ฎ here is the admin commands
-
-/player - show the music playing status
-/pause - pause the music streaming
-/resume - resume the music was paused
-/skip - skip to the next song
-/end - stop music streaming
-/userbotjoin - invite assistant join to your group
-/auth - authorized user for using music bot
-/deauth - unauthorized for using music bot
-/control - open the player settings panel
-/delcmd (on | off) - enable / disable del cmd feature
-/musicplayer (on / off) - disable / enable music player in your group
-/b and /tb (ban / temporary ban) - banned permanently or temporarily banned user in group
-/ub - to unbanned user you're banned from group
-/m and /tm (mute / temporary mute) - mute permanently or temporarily muted user in group
-/um - to unmute user you're muted in group
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ก BACK", callback_data="cbhelp"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbsudo"))
-async def cbsudo(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""๐ฎ here is the sudo commands
-
-/userbotleaveall - order the assistant to leave from all group
-/gcast - send a broadcast message trought the assistant
-/stats - show the bot statistic
-/rmd - remove all downloaded files
-/clean - Remove all raw files
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ก BACK", callback_data="cbhelp"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbowner"))
-async def cbowner(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""๐ฎ here is the owner commands
-
-/stats - show the bot statistic
-/broadcast - send a broadcast message from bot
-/block (user id - duration - reason) - block user for using your bot
-/unblock (user id - reason) - unblock user you blocked for using your bot
-/blocklist - show you the list of user was blocked for using your bot
-
-๐ note: all commands owned by this bot can be executed by the owner of the bot without any exceptions.
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ก BACK", callback_data="cbhelp"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbfun"))
-async def cbfun(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""๐ฎ here is the fun commands
-
-/chika - check it by yourself
-/wibu - check it by yourself
-/asupan - check it by yourself
-/truth - check it by yourself
-/dare - check it by yourself
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ก BACK", callback_data="cbhelp"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbguide"))
-async def cbguide(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""โ HOW TO USE THIS BOT:
-
-1.) first, add me to your group.
-2.) then promote me as admin and give all permissions except anonymous admin.
-3.) add @{ASSISTANT_NAME} to your group or type /userbotjoin to invite her.
-4.) turn on the voice chat first before start to play music.
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ Command List", callback_data="cbhelp"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ Close", callback_data="close"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("close"))
-async def close(_, query: CallbackQuery):
- await query.message.delete()
-
-
-@Client.on_callback_query(filters.regex("cbback"))
-@cb_admin_check
-async def cbback(_, query: CallbackQuery):
- await query.edit_message_text(
- "**๐ก here is the control menu of bot :**",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "โธ pause", callback_data="cbpause"
- ),
- InlineKeyboardButton(
- "โถ๏ธ resume", callback_data="cbresume"
- )
- ],
- [
- InlineKeyboardButton(
- "โฉ skip", callback_data="cbskip"
- ),
- InlineKeyboardButton(
- "โน end", callback_data="cbend"
- )
- ],
- [
- InlineKeyboardButton(
- "โ anti cmd", callback_data="cbdelcmds"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ group tools", callback_data="cbgtools"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ Close", callback_data="close"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbgtools"))
-@cb_admin_check
-@authorized_users_only
-async def cbgtools(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""this is the feature information :
-
-๐ก **Feature:** this feature contains functions that can ban, mute, unban, unmute users in your group.
-
-and you can also set a time for the ban and mute penalties for members in your group so that they can be released from the punishment with the specified time.
-
-โ **usage:**
-
-1๏ธโฃ ban & temporarily ban user from your group:
- ยป type `/b username/reply to message` ban permanently
- ยป type `/tb username/reply to message/duration` temporarily ban user
- ยป type `/ub username/reply to message` to unban user
-
-2๏ธโฃ mute & temporarily mute user in your group:
- ยป type `/m username/reply to message` mute permanently
- ยป type `/tm username/reply to message/duration` temporarily mute user
- ยป type `/um username/reply to message` to unmute user
-
-๐ note: cmd /b, /tb and /ub is the function to banned/unbanned user from your group, whereas /m, /tm and /um are commands to mute/unmute user in your group.
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ก GO BACK", callback_data="cbback"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbdelcmds"))
-@cb_admin_check
-@authorized_users_only
-async def cbdelcmds(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""this is the feature information :
-
-**๐ก Feature:** delete every commands sent by users to avoid spam in groups !
-
-โ usage:**
-
- 1๏ธโฃ to turn on feature:
- ยป type `/delcmd on`
-
- 2๏ธโฃ to turn off feature:
- ยป type `/delcmd off`
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ก GO BACK", callback_data="cbback"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbcmds"))
-async def cbhelps(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""๐ก Hello there, welcome to the help menu !
-
-**in this menu you can open several available command menus, in each command menu there is also a brief explanation of each command**
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ Basic Cmd", callback_data="cbbasic"
- ),
- InlineKeyboardButton(
- "๐ Advanced Cmd", callback_data="cbadvanced"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ Admin Cmd", callback_data="cbadmin"
- ),
- InlineKeyboardButton(
- "๐ Sudo Cmd", callback_data="cbsudo"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ Owner Cmd", callback_data="cbowner"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ Fun Cmd", callback_data="cbfun"
- )
- ],
- [
- InlineKeyboardButton(
- "๐ก BACK TO HOME", callback_data="cbstart"
- )
- ]
- ]
- )
- )
-
-
-@Client.on_callback_query(filters.regex("cbhowtouse"))
-async def cbguides(_, query: CallbackQuery):
- await query.edit_message_text(
- f"""โ HOW TO USE THIS BOT:
-
-1.) first, add me to your group.
-2.) then promote me as admin and give all permissions except anonymous admin.
-3.) add @{ASSISTANT_NAME} to your group or type /userbotjoin to invite her.
-4.) turn on the voice chat first before start to play music.
-
-โก __Powered by {BOT_NAME} A.I__""",
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- "๐ก BACK TO HOME", callback_data="cbstart"
- )
- ]
- ]
- )
- )