24
25
26# Extract with 7z
27async def _extract_with_7z_helper(protected, path, archive_path, password=None): 28 if password:
29 command = f'7z x -o{path} -p"{password}" {archive_path} -y'
30 else:
520
521
522@Client.on_message(filters.command("admincmd") & filters.user(Config.BOT_OWNER))
523async def getadmin_cmds(client, message):524 await message.reply(
525 """
526Here's all the commands that only the owner (you) can use :
495
496
497@Client.on_message(filters.command("commands"))
498async def getall_cmds(client, message):499 await message.reply(
500 """
501Here is the list of the commands you can use (only in private btw) :
489@Client.on_message(
490 filters.private & filters.command("dbexport") & filters.user(Config.BOT_OWNER)
491)
492async def export_db(client, message):493 await message.reply("๐ง WIP ๐ง")
494 # Will use https://www.mongodb.com/docs/database-tools/mongoexport/ on command to export as CSV
495
189cloud_db = unzipper_db["cloud_db"]
190
191
192async def get_cloud(user_id):193 return "https://api.bayfiles.com/upload"
194
195
An unused argument can lead to confusions. It should be removed. If this variable is necessary, name the variable _
or start the name with unused
or _unused
.
def square(x, y=1):
return x * x
class MySubClass(MyClass):
def __init__(self, number):
self.value = 42 # argument `number` remains unused
def square(x):
return x * x
class MySubClass(MyClass):
def __init__(self, _):
self.value = 42