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" - ) - ] - ] - ) - )