from pyrogram import Client as Bot from callsmusic import run from config import API_ID, API_HASH, BOT_TOKEN bot = Bot( ":memory:", API_ID, API_HASH, bot_token=1757815027:AAHGFg9x4tajC4b5jYAvkN_UuoBCe0jLtgE, plugins=dict(root="handlers") ) bot.start() run()
from pyrogram import Client as Bot from callsmusic import run from config import API_ID, API_HASH, BOT_TOKEN from callsmusic import callsmusic as cm import logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) bot = Bot( ":memory:", API_ID, API_HASH, bot_token=BOT_TOKEN, workers=15, plugins=dict(root="handlers") ) cm.client_bot = bot bot.start() run()
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. import requests from pyrogram import Client as Bot from DaisyXMusic.config import API_HASH from DaisyXMusic.config import API_ID from DaisyXMusic.config import BG_IMAGE from DaisyXMusic.config import BOT_TOKEN from DaisyXMusic.services.callsmusic import run response = requests.get(BG_IMAGE) file = open("./etc/foreground.png", "wb") file.write(response.content) file.close() bot = Bot( ":memory:", API_ID, API_HASH, bot_token=BOT_TOKEN, plugins=dict(root="DaisyXMusic.modules"), ) bot.start() run()
from pyrogram import Client as Bot from config import API_ID, API_HASH, BOT_TOKEN Bot(":memory:", API_ID, API_HASH, bot_token=BOT_TOKEN, plugins=dict(root="handlers")).run()
from pyrogram import Client as Bot, filters from pyrogram.types import Message import vcpb from helpers import is_youtube from config import API_ID, API_HASH, BOT_TOKEN bot = Bot(":memory:", API_ID, API_HASH, bot_token=BOT_TOKEN) @bot.on_message( filters.command(["leave", "stop"]) & filters.group & ~filters.edited) async def leave(bot: Bot, message: Message): await vcpb.leave(message.chat.id) await message.delete() @bot.on_message(filters.command("pause") & filters.group & ~filters.edited) async def pause(bot: Bot, message: Message): await vcpb.pause(message.chat.id) await message.delete() @bot.on_message(filters.command("resume") & filters.group & ~filters.edited) async def resume(bot: Bot, message: Message): await vcpb.resume(message.chat.id) await message.delete()
import requests from pyrogram import Client as Bot from GeezProject.config import API_HASH, API_ID, BG_IMAGE, BOT_TOKEN from GeezProject.services.callsmusic import run response = requests.get(BG_IMAGE) file = open("./etc/foreground.png", "wb") file.write(response.content) file.close() bot = Bot( ":memory:", API_ID, API_HASH, bot_token=BOT_TOKEN, plugins=dict(root="GeezProject.modules"), ) bot.start() run()
from pyrogram import Client as Bot from .callsmusic import run from .config import API_HASH from .config import API_ID from .config import BOT_TOKEN Bot( ':memory:', API_ID, API_HASH, bot_token=BOT_TOKEN, plugins={ 'root': 'callsmusic.handlers' }, ).start() run()