4import requests
5
6@app.on_message(filters.command("stack", prefix) & filters.me)
7async def stack(app, msg): 8 await msg.edit("Processing...")
9 if len(msg.command) < 2:
10 await msg.edit(f"`{prefix}stack` **query**")
4import requests
5
6@app.on_message(filters.command("repo", prefix) & filters.me)
7async def search_repo(app, msg): 8 url = "https://api.github.com/search/repositories?q="
9 if len(msg.command) < 2:
10 await msg.edit(f"`{prefix}search-repo` **query**")
55
56# list of categories from data
57@app.on_message(filters.command("neko2list", prefix) & filters.me)
58async def neko2list(app, msg):59 # parse data to string and make list of categories
60 categories = "\n-".join(data)
61 # usage of categories
76
77# list of categories from data dsfw and dnsfw for nekolist
78@app.on_message(filters.command("nekolist", prefix) & filters.me)
79async def getNekoList(app, msg):80 sfw = "\n- ".join(dsfw)
81 nsfw = "\n- ".join(dnsfw)
82 await msg.edit(f"**SFW (Safe for work) list** \n\n- {sfw}\n\n**NSFW (NOT safe for work) list** \n\n- {nsfw}")
5
6# exec os command and send output to message
7@app.on_message(filters.command(["exec",">"], prefix) & filters.me)
8async def execCommand(app, msg): 9 if len(msg.command) < 2:
10 await msg.edit("Usage: `exec [command]`")
11 return
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