# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module containing commands related to android""" import re from requests import get from bs4 import BeautifulSoup from userbot import CMD_HELP from userbot.utils import register from global_variables_sql import SYNTAX, MODULE_LIST MODULE_LIST.append("android") GITHUB = 'https://github.com' DEVICES_DATA = 'https://raw.githubusercontent.com/androidtrackers/' \ 'certified-android-devices/master/devices.json' @register(outgoing=True, pattern="^.magisk$") async def magisk(request): """ magisk latest releases """ magisk_dict = { "Stable": "https://raw.githubusercontent.com/topjohnwu/magisk_files/master/stable.json", "Beta": "https://raw.githubusercontent.com/topjohnwu/magisk_files/master/beta.json" }
"""AFK Plugin for @UniBorg Syntax: .afk REASON""" import asyncio import datetime from datetime import datetime from telethon import events from telethon.tl import functions, types from global_variables_sql import SYNTAX, MODULE_LIST MODULE_LIST.append("afk") global USER_AFK # pylint:disable=E0602 global afk_time # pylint:disable=E0602 global last_afk_message # pylint:disable=E0602 global afk_start global afk_end USER_AFK = {} afk_time = None last_afk_message = {} afk_start = {} @borg.on(events.NewMessage(pattern=r"\.afk ?(.*)", outgoing=True)) # pylint:disable=E0602 async def _(event): if event.fwd_from: return global USER_AFK # pylint:disable=E0602 global afk_time # pylint:disable=E0602 global last_afk_message # pylint:disable=E0602 global afk_start
).get_attribute('value') await e.edit("`Done Dana Done...\n100%`") file = './carbon.png' await e.edit("`Uploading..`") await e.client.send_file( e.chat_id, file, caption= "<< `Here's your carbon!` \n **Carbonised by** DeOXy BOT>>\n**Colour Scheme: **`{}`" .format(color_name), force_document=True, reply_to=e.message.reply_to_msg_id, ) os.remove('./Anubis.png') driver.quit() # Removing carbon.png after uploading await e.delete() # Deleting msg MODULE_LIST.append("carbon") SYNTAX.update({ "carbon": f"\ **Requested Module --> Carbonizer**\ \n\nDetailed usage of fuction(s):\ \n\n```.carbon <name>```\ \nUsage: Prints a cool carbon name.\ " })
await ups.edit(f'{txt}\n`Here is the error log:\n{error}`') repo.__del__() return await ups.edit('`Successfully Updated!\n' 'Restarting, please wait...`') else: # Classic Updater, pretty straightforward. try: ups_rem.pull(ac_br) except GitCommandError: repo.git.reset("--hard", "FETCH_HEAD") reqs_upgrade = await update_requirements() await ups.edit('`Successfully Updated!\n' 'Bot is restarting... Wait for a second!`') # Spin a new instance of bot args = [sys.executable, "-m", "userbot"] execle(sys.executable, *args, environ) return MODULE_LIST.append("updater") SYNTAX.update({ "updater": "\ **š”ššš©š Updater**\ \n\nā¢ `.update`\ \nUsage: __Checks for USERBOT updates.__\ \n\nā¢ `.update now`\ \nUsage: __Downloads and Installs latest š”ššš©š update.__\ " })
import asyncio from telethon import events from telethon.tl.functions.channels import EditBannedRequest from telethon.tl.types import (PeerChat, PeerChannel, ChannelParticipantsAdmins, ChatAdminRights, ChatBannedRights, MessageEntityMentionName, MessageMediaPhoto, ChannelParticipantsBots) from telethon.tl.types import Channel from telethon.tl.functions.contacts import BlockRequest, UnblockRequest client = telebot = bot from telethon.tl.functions.messages import GetCommonChatsRequest ALIVE_NAME = str(ALIVE_NAME) from telethon.events import ChatAction from global_variables_sql import SYNTAX, MODULE_LIST MODULE_LIST.append("global_rights") SYNTAX.update({ "global_rights": "\ **Requested Module --> Global Rights Module**\ \n\n**Detailed usage of fuction(s):**\ \n\n```.gban```\ \nUsage: Globally bans a user everywhere you admin in.\ \n\n```.ungban```\ \nUsage: UnGlobally bans a user everywhere you admin in.\ \n\n```.gmute```\ \nUsage: Globally mutes a user everywhere you admin in.\ \n\n```.ungmute```\ \nUsage: Globally unmutes a user everywhere you admin in.\ "