Переглянути джерело

Merge pull request #19 from dashezup/pylint-fix-some-warnings

Pylint: add pylintrc and fix some warnings

code rate improved from 7.51/10 to 9.91/10
Dash Eclipse 5 роки тому
батько
коміт
05472222fc

+ 26 - 0
commands.txt

@@ -0,0 +1,26 @@
+####Send this list to @botfather to set your commands.
+
+ban - Ban A User
+banme - Ban Yourself
+cat - Get Cute Cats Images
+commit - Generate Funny Commit Messages
+dev - Forward Anything To Developers [SPAM = GBAN]
+dog - Get Cute Dogs Images
+help - Help Yourself!
+id - Get Chat_ID or User_ID
+kick - Kick A User
+kickme - Kick Yourself
+log - Get Logs From Last Run.
+music - [link] To Download Music From Various Websites
+paste - Paste To Neokobin
+ping - Get Response Time From All TG Datacenters
+purge - Purge Messages
+quote - Get Random Linux Quotes
+repo - Get My Github Repository Link And Support Group Link
+rice - Forward Your Linux Rice To DE_WM'sRice Gallery only works in DE_WM
+runs - Idk Test Yourself
+start - Start The Bot
+speedtest - To Perform A Speedtest.
+stats  - To Check System Status.
+unban - Unban A User
+wall - Get Wallpapers

+ 592 - 0
pylintrc

@@ -0,0 +1,592 @@
+[MASTER]
+
+# A comma-separated list of package or module names from where C extensions may
+# be loaded. Extensions are loading into the active Python interpreter and may
+# run arbitrary code.
+extension-pkg-whitelist=
+
+# Specify a score threshold to be exceeded before program exits with error.
+fail-under=10.0
+
+# Add files or directories to the blacklist. They should be base names, not
+# paths.
+ignore=CVS
+
+# Add files or directories matching the regex patterns to the blacklist. The
+# regex matches against base names, not paths.
+ignore-patterns=
+
+# Python code to execute, usually for sys.path manipulation such as
+# pygtk.require().
+#init-hook=
+
+# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
+# number of processors available to use.
+jobs=1
+
+# Control the amount of potential inferred values when inferring a single
+# object. This can help the performance when dealing with large functions or
+# complex, nested conditions.
+limit-inference-results=100
+
+# List of plugins (as comma separated values of python module names) to load,
+# usually to register additional checkers.
+load-plugins=
+
+# Pickle collected data for later comparisons.
+persistent=yes
+
+# When enabled, pylint would attempt to guess common misconfiguration and emit
+# user-friendly hints instead of false-positive error messages.
+suggestion-mode=yes
+
+# Allow loading of arbitrary C extensions. Extensions are imported into the
+# active Python interpreter and may run arbitrary code.
+unsafe-load-any-extension=no
+
+
+[MESSAGES CONTROL]
+
+# Only show warnings with the listed confidence levels. Leave empty to show
+# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
+confidence=
+
+# Disable the message, report, category or checker with the given id(s). You
+# can either give multiple identifiers separated by comma (,) or put this
+# option multiple times (only on the command line, not in the configuration
+# file where it should appear only once). You can also use "--disable=all" to
+# disable everything first and then reenable specific checks. For example, if
+# you want to run only the similarities checker, you can use "--disable=all
+# --enable=similarities". If you want to run only the classes checker, but have
+# no Warning level messages displayed, use "--disable=all --enable=classes
+# --disable=W".
+disable=print-statement,
+        parameter-unpacking,
+        unpacking-in-except,
+        old-raise-syntax,
+        backtick,
+        long-suffix,
+        old-ne-operator,
+        old-octal-literal,
+        import-star-module-level,
+        non-ascii-bytes-literal,
+        raw-checker-failed,
+        bad-inline-option,
+        locally-disabled,
+        file-ignored,
+        suppressed-message,
+        useless-suppression,
+        deprecated-pragma,
+        use-symbolic-message-instead,
+        apply-builtin,
+        basestring-builtin,
+        buffer-builtin,
+        cmp-builtin,
+        coerce-builtin,
+        execfile-builtin,
+        file-builtin,
+        long-builtin,
+        raw_input-builtin,
+        reduce-builtin,
+        standarderror-builtin,
+        unicode-builtin,
+        xrange-builtin,
+        coerce-method,
+        delslice-method,
+        getslice-method,
+        setslice-method,
+        no-absolute-import,
+        old-division,
+        dict-iter-method,
+        dict-view-method,
+        next-method-called,
+        metaclass-assignment,
+        indexing-exception,
+        raising-string,
+        reload-builtin,
+        oct-method,
+        hex-method,
+        nonzero-method,
+        cmp-method,
+        input-builtin,
+        round-builtin,
+        intern-builtin,
+        unichr-builtin,
+        map-builtin-not-iterating,
+        zip-builtin-not-iterating,
+        range-builtin-not-iterating,
+        filter-builtin-not-iterating,
+        using-cmp-argument,
+        eq-without-hash,
+        div-method,
+        idiv-method,
+        rdiv-method,
+        exception-message-attribute,
+        invalid-str-codec,
+        sys-max-int,
+        bad-python3-import,
+        deprecated-string-function,
+        deprecated-str-translate-call,
+        deprecated-itertools-function,
+        deprecated-types-field,
+        next-method-defined,
+        dict-items-not-iterating,
+        dict-keys-not-iterating,
+        dict-values-not-iterating,
+        deprecated-operator-function,
+        deprecated-urllib-function,
+        xreadlines-attribute,
+        deprecated-sys-function,
+        exception-escape,
+        comprehension-escape,
+        C0114,  # missing-module-docstring
+        C0115,  # missing-class-docstring
+        C0116   # missing-function-docstring
+
+# Enable the message, report, category or checker with the given id(s). You can
+# either give multiple identifier separated by comma (,) or put this option
+# multiple time (only on the command line, not in the configuration file where
+# it should appear only once). See also the "--disable" option for examples.
+enable=c-extension-no-member
+
+
+[REPORTS]
+
+# Python expression which should return a score less than or equal to 10. You
+# have access to the variables 'error', 'warning', 'refactor', and 'convention'
+# which contain the number of messages in each category, as well as 'statement'
+# which is the total number of statements analyzed. This score is used by the
+# global evaluation report (RP0004).
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
+
+# Template used to display messages. This is a python new-style format string
+# used to format the message information. See doc for all details.
+#msg-template=
+
+# Set the output format. Available formats are text, parseable, colorized, json
+# and msvs (visual studio). You can also give a reporter class, e.g.
+# mypackage.mymodule.MyReporterClass.
+output-format=text
+
+# Tells whether to display a full report or only the messages.
+reports=no
+
+# Activate the evaluation score.
+score=yes
+
+
+[REFACTORING]
+
+# Maximum number of nested blocks for function / method body
+max-nested-blocks=5
+
+# Complete name of functions that never returns. When checking for
+# inconsistent-return-statements if a never returning function is called then
+# it will be considered as an explicit return statement and no message will be
+# printed.
+never-returning-functions=sys.exit
+
+
+[BASIC]
+
+# Naming style matching correct argument names.
+argument-naming-style=snake_case
+
+# Regular expression matching correct argument names. Overrides argument-
+# naming-style.
+#argument-rgx=
+
+# Naming style matching correct attribute names.
+attr-naming-style=snake_case
+
+# Regular expression matching correct attribute names. Overrides attr-naming-
+# style.
+#attr-rgx=
+
+# Bad variable names which should always be refused, separated by a comma.
+bad-names=foo,
+          bar,
+          baz,
+          toto,
+          tutu,
+          tata
+
+# Bad variable names regexes, separated by a comma. If names match any regex,
+# they will always be refused
+bad-names-rgxs=
+
+# Naming style matching correct class attribute names.
+class-attribute-naming-style=any
+
+# Regular expression matching correct class attribute names. Overrides class-
+# attribute-naming-style.
+#class-attribute-rgx=
+
+# Naming style matching correct class names.
+class-naming-style=PascalCase
+
+# Regular expression matching correct class names. Overrides class-naming-
+# style.
+#class-rgx=
+
+# Naming style matching correct constant names.
+const-naming-style=UPPER_CASE
+
+# Regular expression matching correct constant names. Overrides const-naming-
+# style.
+#const-rgx=
+
+# Minimum line length for functions/classes that require docstrings, shorter
+# ones are exempt.
+docstring-min-length=-1
+
+# Naming style matching correct function names.
+function-naming-style=snake_case
+
+# Regular expression matching correct function names. Overrides function-
+# naming-style.
+#function-rgx=
+
+# Good variable names which should always be accepted, separated by a comma.
+good-names=i,
+           j,
+           k,
+           m,
+           ex,
+           Run,
+           _
+
+# Good variable names regexes, separated by a comma. If names match any regex,
+# they will always be accepted
+good-names-rgxs=
+
+# Include a hint for the correct naming format with invalid-name.
+include-naming-hint=no
+
+# Naming style matching correct inline iteration names.
+inlinevar-naming-style=any
+
+# Regular expression matching correct inline iteration names. Overrides
+# inlinevar-naming-style.
+#inlinevar-rgx=
+
+# Naming style matching correct method names.
+method-naming-style=snake_case
+
+# Regular expression matching correct method names. Overrides method-naming-
+# style.
+#method-rgx=
+
+# Naming style matching correct module names.
+module-naming-style=snake_case
+
+# Regular expression matching correct module names. Overrides module-naming-
+# style.
+#module-rgx=
+
+# Colon-delimited sets of names that determine each other's naming style when
+# the name regexes allow several styles.
+name-group=
+
+# Regular expression which should only match function or class names that do
+# not require a docstring.
+no-docstring-rgx=^_
+
+# List of decorators that produce properties, such as abc.abstractproperty. Add
+# to this list to register other decorators that produce valid properties.
+# These decorators are taken in consideration only for invalid-name.
+property-classes=abc.abstractproperty
+
+# Naming style matching correct variable names.
+variable-naming-style=snake_case
+
+# Regular expression matching correct variable names. Overrides variable-
+# naming-style.
+#variable-rgx=
+
+
+[FORMAT]
+
+# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
+expected-line-ending-format=
+
+# Regexp for a line that is allowed to be longer than the limit.
+ignore-long-lines=^\s*(# )?<?https?://\S+>?$
+
+# Number of spaces of indent required inside a hanging or continued line.
+indent-after-paren=4
+
+# String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
+# tab).
+indent-string='    '
+
+# Maximum number of characters on a single line.
+max-line-length=100
+
+# Maximum number of lines in a module.
+max-module-lines=1000
+
+# Allow the body of a class to be on the same line as the declaration if body
+# contains single statement.
+single-line-class-stmt=no
+
+# Allow the body of an if to be on the same line as the test if there is no
+# else.
+single-line-if-stmt=no
+
+
+[LOGGING]
+
+# The type of string formatting that logging methods do. `old` means using %
+# formatting, `new` is for `{}` formatting.
+logging-format-style=old
+
+# Logging modules to check that the string format arguments are in logging
+# function parameter format.
+logging-modules=logging
+
+
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+notes=FIXME,
+      XXX,
+      TODO
+
+# Regular expression of note tags to take in consideration.
+#notes-rgx=
+
+
+[SIMILARITIES]
+
+# Ignore comments when computing similarities.
+ignore-comments=yes
+
+# Ignore docstrings when computing similarities.
+ignore-docstrings=yes
+
+# Ignore imports when computing similarities.
+ignore-imports=no
+
+# Minimum lines number of a similarity.
+min-similarity-lines=4
+
+
+[SPELLING]
+
+# Limits count of emitted suggestions for spelling mistakes.
+max-spelling-suggestions=4
+
+# Spelling dictionary name. Available dictionaries: none. To make it work,
+# install the python-enchant package.
+spelling-dict=
+
+# List of comma separated words that should not be checked.
+spelling-ignore-words=
+
+# A path to a file that contains the private dictionary; one word per line.
+spelling-private-dict-file=
+
+# Tells whether to store unknown words to the private dictionary (see the
+# --spelling-private-dict-file option) instead of raising a message.
+spelling-store-unknown-words=no
+
+
+[STRING]
+
+# This flag controls whether inconsistent-quotes generates a warning when the
+# character used as a quote delimiter is used inconsistently within a module.
+check-quote-consistency=no
+
+# This flag controls whether the implicit-str-concat should generate a warning
+# on implicit string concatenation in sequences defined over several lines.
+check-str-concat-over-line-jumps=no
+
+
+[TYPECHECK]
+
+# List of decorators that produce context managers, such as
+# contextlib.contextmanager. Add to this list to register other decorators that
+# produce valid context managers.
+contextmanager-decorators=contextlib.contextmanager
+
+# List of members which are set dynamically and missed by pylint inference
+# system, and so shouldn't trigger E1101 when accessed. Python regular
+# expressions are accepted.
+generated-members=
+
+# Tells whether missing members accessed in mixin class should be ignored. A
+# mixin class is detected if its name ends with "mixin" (case insensitive).
+ignore-mixin-members=yes
+
+# Tells whether to warn about missing members when the owner of the attribute
+# is inferred to be None.
+ignore-none=yes
+
+# This flag controls whether pylint should warn about no-member and similar
+# checks whenever an opaque object is returned when inferring. The inference
+# can return multiple potential results while evaluating a Python object, but
+# some branches might not be evaluated, which results in partial inference. In
+# that case, it might be useful to still emit no-member and other checks for
+# the rest of the inferred objects.
+ignore-on-opaque-inference=yes
+
+# List of class names for which member attributes should not be checked (useful
+# for classes with dynamically set attributes). This supports the use of
+# qualified names.
+ignored-classes=optparse.Values,thread._local,_thread._local
+
+# List of module names for which member attributes should not be checked
+# (useful for modules/projects where namespaces are manipulated during runtime
+# and thus existing member attributes cannot be deduced by static analysis). It
+# supports qualified module names, as well as Unix pattern matching.
+ignored-modules=
+
+# Show a hint with possible names when a member name was not found. The aspect
+# of finding the hint is based on edit distance.
+missing-member-hint=yes
+
+# The minimum edit distance a name should have in order to be considered a
+# similar match for a missing member name.
+missing-member-hint-distance=1
+
+# The total number of similar names that should be taken in consideration when
+# showing a hint for a missing member.
+missing-member-max-choices=1
+
+# List of decorators that change the signature of a decorated function.
+signature-mutators=
+
+
+[VARIABLES]
+
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid defining new builtins when possible.
+additional-builtins=
+
+# Tells whether unused global variables should be treated as a violation.
+allow-global-unused-variables=yes
+
+# List of strings which can identify a callback function by name. A callback
+# name must start or end with one of those strings.
+callbacks=cb_,
+          _cb
+
+# A regular expression matching the name of dummy variables (i.e. expected to
+# not be used).
+dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
+
+# Argument names that match this expression will be ignored. Default to name
+# with leading underscore.
+ignored-argument-names=_.*|^ignored_|^unused_
+
+# Tells whether we should check for unused import in __init__ files.
+init-import=no
+
+# List of qualified module names which can have objects that can redefine
+# builtins.
+redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
+
+
+[CLASSES]
+
+# List of method names used to declare (i.e. assign) instance attributes.
+defining-attr-methods=__init__,
+                      __new__,
+                      setUp,
+                      __post_init__
+
+# List of member names, which should be excluded from the protected access
+# warning.
+exclude-protected=_asdict,
+                  _fields,
+                  _replace,
+                  _source,
+                  _make
+
+# List of valid names for the first argument in a class method.
+valid-classmethod-first-arg=cls
+
+# List of valid names for the first argument in a metaclass class method.
+valid-metaclass-classmethod-first-arg=cls
+
+
+[DESIGN]
+
+# Maximum number of arguments for function / method.
+max-args=5
+
+# Maximum number of attributes for a class (see R0902).
+max-attributes=7
+
+# Maximum number of boolean expressions in an if statement (see R0916).
+max-bool-expr=5
+
+# Maximum number of branch for function / method body.
+max-branches=12
+
+# Maximum number of locals for function / method body.
+max-locals=15
+
+# Maximum number of parents for a class (see R0901).
+max-parents=7
+
+# Maximum number of public methods for a class (see R0904).
+max-public-methods=20
+
+# Maximum number of return / yield for function / method body.
+max-returns=6
+
+# Maximum number of statements in function / method body.
+max-statements=50
+
+# Minimum number of public methods for a class (see R0903).
+min-public-methods=2
+
+
+[IMPORTS]
+
+# List of modules that can be imported at any level, not just the top level
+# one.
+allow-any-import-level=
+
+# Allow wildcard imports from modules that define __all__.
+allow-wildcard-with-all=no
+
+# Analyse import fallback blocks. This can be used to support both Python 2 and
+# 3 compatible code, which means that the block might have code that exists
+# only in one or another interpreter, leading to false positives when analysed.
+analyse-fallback-blocks=no
+
+# Deprecated modules which should not be used, separated by a comma.
+deprecated-modules=optparse,tkinter.tix
+
+# Create a graph of external dependencies in the given file (report RP0402 must
+# not be disabled).
+ext-import-graph=
+
+# Create a graph of every (i.e. internal and external) dependencies in the
+# given file (report RP0402 must not be disabled).
+import-graph=
+
+# Create a graph of internal dependencies in the given file (report RP0402 must
+# not be disabled).
+int-import-graph=
+
+# Force import order to recognize a module as part of the standard
+# compatibility libraries.
+known-standard-library=
+
+# Force import order to recognize a module as part of a third party library.
+known-third-party=enchant
+
+# Couples of modules and preferred modules, separated by a comma.
+preferred-modules=
+
+
+[EXCEPTIONS]
+
+# Exceptions that will emit a warning when being caught. Defaults to
+# "BaseException, Exception".
+overgeneral-exceptions=BaseException,
+                       Exception

+ 19 - 19
wbb/__main__.py

@@ -1,14 +1,14 @@
 import asyncio
-import uvloop
 import re
 import importlib
+import time
+import uvloop
 from pyrogram import filters, idle
 from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
 from wbb import app, MOD_NOLOAD
 from wbb.utils import get_info, paginate_modules, cust_filter
 from wbb.utils import botinfo, formatter
 from wbb.modules import ALL_MODULES
-import time
 from wbb import bot_start_time
 
 loop = asyncio.get_event_loop()
@@ -57,7 +57,7 @@ async def start_bot():
 
 
 @app.on_message(cust_filter.command("start"))
-async def start(client, message):
+async def start(client, message):  # pylint: disable=W0613
     bot_uptime = int(time.time() - bot_start_time)
     await message.reply_text(
         f"Already Online Since {formatter.get_readable_time((bot_uptime))},"
@@ -105,12 +105,12 @@ async def help_parser(message, keyboard=None):
 
 
 @app.on_callback_query(filters.regex(r"help_(.*?)"))
-async def help_button(c, q):
-    mod_match = re.match(r"help_module\((.+?)\)", q.data)
-    prev_match = re.match(r"help_prev\((.+?)\)", q.data)
-    next_match = re.match(r"help_next\((.+?)\)", q.data)
-    back_match = re.match(r"help_back", q.data)
-    create_match = re.match(r"help_create", q.data)
+async def help_button(client, query):
+    mod_match = re.match(r"help_module\((.+?)\)", query.data)
+    prev_match = re.match(r"help_prev\((.+?)\)", query.data)
+    next_match = re.match(r"help_next\((.+?)\)", query.data)
+    back_match = re.match(r"help_back", query.data)
+    create_match = re.match(r"help_create", query.data)
 
     if mod_match:
         module = mod_match.group(1)
@@ -121,7 +121,7 @@ async def help_button(c, q):
             + HELPABLE[module].__HELP__
         )
 
-        await q.message.edit(
+        await query.message.edit(
             text=text,
             reply_markup=InlineKeyboardMarkup(
                 [[InlineKeyboardButton("back", callback_data="help_back")]]
@@ -131,9 +131,9 @@ async def help_button(c, q):
 
     elif prev_match:
         curr_page = int(prev_match.group(1))
-        await q.message.edit(
+        await query.message.edit(
             text="Hi {first_name}. I am {bot_name}".format(
-                first_name=q.from_user.first_name,
+                first_name=query.from_user.first_name,
                 bot_name=botinfo.BOT_NAME,
             ),
             reply_markup=InlineKeyboardMarkup(
@@ -144,9 +144,9 @@ async def help_button(c, q):
 
     elif next_match:
         next_page = int(next_match.group(1))
-        await q.message.edit(
+        await query.message.edit(
             text="Hi {first_name}. I am {bot_name}".format(
-                first_name=q.from_user.first_name,
+                first_name=query.from_user.first_name,
                 bot_name=botinfo.BOT_NAME,
             ),
             reply_markup=InlineKeyboardMarkup(
@@ -156,9 +156,9 @@ async def help_button(c, q):
         )
 
     elif back_match:
-        await q.message.edit(
+        await query.message.edit(
             text="Hi {first_name}. I am {bot_name}".format(
-                first_name=q.from_user.first_name,
+                first_name=query.from_user.first_name,
                 bot_name=botinfo.BOT_NAME,
             ),
             reply_markup=InlineKeyboardMarkup(
@@ -168,12 +168,12 @@ async def help_button(c, q):
         )
 
     elif create_match:
-        text, keyboard = await help_parser(q)
-        await q.message.edit(
+        text, keyboard = await help_parser(query)
+        await query.message.edit(
             text=text, reply_markup=keyboard, disable_web_page_preview=True
         )
 
-    return await c.answer_callback_query(q.id)
+    return await client.answer_callback_query(query.id)
 
 
 if __name__ == "__main__":

+ 14 - 13
wbb/modules/__init__.py

@@ -1,13 +1,14 @@
+import glob
 import importlib
+import sys
+
+from os.path import dirname, basename, isfile
 from wbb import MOD_LOAD, MOD_NOLOAD, log
 
 
 def __list_all_modules():
-    from os.path import dirname, basename, isfile
-    import glob
-
-# This generates a list of modules in this
-# folder for the * in __main__ to work.
+    # This generates a list of modules in this
+    # folder for the * in __main__ to work.
     mod_paths = glob.glob(dirname(__file__) + "/*.py")
     all_modules = [
         basename(f)[:-3]
@@ -19,23 +20,23 @@ def __list_all_modules():
     ]
 
     if MOD_LOAD or MOD_NOLOAD:
-        to_Load = MOD_LOAD
-        if to_Load:
+        to_load = MOD_LOAD
+        if to_load:
             if not all(
                 any(mod == module_name for module_name in all_modules)
-                for mod in to_Load
+                for mod in to_load
             ):
                 log.error("Invalid Module name!")
-                quit(1)
+                sys.exit()
 
         else:
-            to_Load = all_modules
+            to_load = all_modules
 
         if MOD_NOLOAD:
-            log.info("No load: {}".format(MOD_NOLOAD))
-            return [item for item in to_Load if item not in MOD_NOLOAD]
+            log.info("No load: %s", MOD_NOLOAD)
+            return [item for item in to_load if item not in MOD_NOLOAD]
 
-        return to_Load
+        return to_load
 
     return all_modules
 

+ 23 - 21
wbb/modules/admin.py

@@ -1,12 +1,14 @@
+from pyrogram.types import Message
 from wbb import OWNER_ID, SUDO_USER_ID, app
 from wbb.utils import cust_filter
-from pyrogram.types import Message
 
 __MODULE__ = "Admin"
-__HELP__ = "/purge - Purge Messages\n" \
-           "/kick - Kick A User\n" \
-           "/ban - Ban A User\n" \
-           "/unban - Unban A User"
+__HELP__ = "/ban    - Ban A User\n" \
+           "/unban  - Unban A User\n" \
+           "/kick   - Kick A User\n" \
+           "/purge  - Purge Messages\n" \
+           "/banme  - Bans A User Who Issued The Command\n" \
+           "/kickme - Kicks A User Who Issued The Command"
 
 SUDO = [OWNER_ID, SUDO_USER_ID]
 
@@ -35,7 +37,7 @@ async def list_members(group_id):
 @app.on_message(cust_filter.command(commands=("purge")))
 async def purge(client, message: Message):
     message_ids = []
-    if message.chat.type not in (("supergroup", "channel")):
+    if message.chat.type not in ("supergroup", "channel"):
         return
 
     admins = await list_admins(message.chat.id)
@@ -81,7 +83,7 @@ async def purge(client, message: Message):
 
 
 @app.on_message(cust_filter.command(commands=("kick")))
-async def kick(client, message: Message):
+async def kick(client, message: Message):  # pylint: disable=W0613
     try:
         username = (message.text.split(None, 2)[1])
     except IndexError:
@@ -112,9 +114,9 @@ async def kick(client, message: Message):
             else:
                 if message.reply_to_message.from_user.id in \
                         await list_members(message.chat.id):
-                    id = message.reply_to_message.from_user.id
-                    await message.reply_to_message.chat.kick_member(id)
-                    await message.reply_to_message.chat.unban_member(id)
+                    user_id = message.reply_to_message.from_user.id
+                    await message.reply_to_message.chat.kick_member(user_id)
+                    await message.reply_to_message.chat.unban_member(user_id)
                     await message.reply_text(f"Kicked {username}")
                 else:
                     await message.reply_text("This user isn't here,"
@@ -124,7 +126,7 @@ async def kick(client, message: Message):
 
 
 @app.on_message(cust_filter.command(commands=("ban")))
-async def ban(client, message: Message):
+async def ban(client, message: Message):  # pylint: disable=W0613
     try:
         username = (message.text.split(None, 2)[1])
     except IndexError:
@@ -153,8 +155,8 @@ async def ban(client, message: Message):
             else:
                 if (await app.get_users(username)).id in \
                         await list_members(message.chat.id):
-                    id = message.reply_to_message.from_user.id
-                    await message.reply_to_message.chat.kick_member(id)
+                    user_id = message.reply_to_message.from_user.id
+                    await message.reply_to_message.chat.kick_member(user_id)
                     await message.reply_text(f"Banned {username}")
                 else:
                     await message.reply_text("This user isn't here,"
@@ -164,7 +166,7 @@ async def ban(client, message: Message):
 
 
 @app.on_message(cust_filter.command(commands=("unban")))
-async def unban(client, message: Message):
+async def unban(client, message: Message):  # pylint: disable=W0613
     try:
         username = (message.text.split(None, 2)[1])
     except IndexError:
@@ -178,7 +180,7 @@ async def unban(client, message: Message):
         if username != "":
             if (await app.get_users(username)).id not in \
                     await list_members(message.chat.id):
-                await message.chat.kick_member(username)
+                await message.chat.unban_member(username)
                 await message.reply_text(f"Unbanned {username}")
             else:
                 await message.reply_text("This user is already here,"
@@ -186,8 +188,8 @@ async def unban(client, message: Message):
         else:
             if (await app.get_users(username)).id not in \
                     await list_members(message.chat.id):
-                id = message.reply_to_message.from_user.id
-                await message.reply_to_message.chat.kick_member(id)
+                user_id = message.reply_to_message.from_user.id
+                await message.reply_to_message.chat.unban_member(user_id)
                 await message.reply_text(f"Unbanned {username}")
             else:
                 await message.reply_text("This user is already here,"
@@ -197,11 +199,11 @@ async def unban(client, message: Message):
 
 
 @app.on_message(cust_filter.command(commands=("kickme")))
-async def kickme(client, message: Message):
+async def kickme(client, message: Message):  # pylint: disable=W0613
     if message.from_user.id not in SUDO:
         await message.chat.kick_member(message.from_user.id)
         await message.chat.unban_member(message.from_user.id)
-        await message.reply_text("Kicked!, Joke's on you, i'm into that shit")
+        await message.reply_text("Kicked!, Joke's on you, I'm into that shit!")
     else:
         await message.reply_text("It doesn't works that way mate.")
 
@@ -209,9 +211,9 @@ async def kickme(client, message: Message):
 
 
 @app.on_message(cust_filter.command(commands=("banme")))
-async def banme(client, message: Message):
+async def banme(client, message: Message):  # pylint: disable=W0613
     if message.from_user.id not in SUDO:
         await message.chat.kick_member(message.from_user.id)
-        await message.reply_text("Banned!, Joke's on you, I'm into that shit")
+        await message.reply_text("Banned!, Joke's on you, I'm into that shit!")
     else:
         await message.reply_text("It doesn't works that way mate.")

+ 2 - 2
wbb/modules/greetings.py

@@ -1,12 +1,12 @@
-from wbb import app
 from pyrogram import filters, emoji
 from pyrogram.types import Message
+from wbb import app
 
 MESSAGE = "{} Welcome {}!"
 
 
 @app.on_message(filters.new_chat_members)
-async def welcome(client, message: Message):
+async def welcome(client, message: Message):  # pylint: disable=W0613
     new_members = [i.mention for i in message.new_chat_members]
     text = MESSAGE.format(emoji.CROWN, ",  ".join(new_members))
     await message.reply_text(text, disable_web_page_preview=True)

+ 13 - 15
wbb/modules/images.py

@@ -1,11 +1,11 @@
-from wbb.utils import cust_filter
-from wbb import app, WALL_API_KEY
 import urllib.request
 import json
 from random import randint
-import requests as r
 import asyncio
+import requests as r
 from pyrogram.types import Message
+from wbb.utils import cust_filter
+from wbb import app, WALL_API_KEY
 
 __MODULE__ = "Images"
 __HELP__ = "/cat - Get Cute Cats Images\n" + \
@@ -15,11 +15,11 @@ __HELP__ = "/cat - Get Cute Cats Images\n" + \
 
 async def delete_message_with_delay(delay, message: Message):
     await asyncio.sleep(delay)
-    (message).delete()
+    await message.delete()
 
 
 @app.on_message(cust_filter.command(commands=("cat")))
-async def cat(client, message: Message):
+async def cat(client, message: Message):  # pylint: disable=W0613
     with urllib.request.urlopen(
         "https://api.thecatapi.com/v1/images/search"
     ) as url:
@@ -29,7 +29,7 @@ async def cat(client, message: Message):
 
 
 @app.on_message(cust_filter.command(commands=("dog")))
-async def dog(client, message: Message):
+async def dog(client, message: Message):  # pylint: disable=W0613
     with urllib.request.urlopen(
         "https://api.thedogapi.com/v1/images/search"
     ) as url:
@@ -39,7 +39,7 @@ async def dog(client, message: Message):
 
 
 @app.on_message(cust_filter.command(commands=("wall")))
-async def wall(client, message: Message):
+async def wall(client, message: Message):  # pylint: disable=W0613
     app.set_parse_mode("markdown")
     m = await message.reply_text("Searching!")
     initial_term = (message.text.replace('/wall', ''))
@@ -49,18 +49,16 @@ async def wall(client, message: Message):
 
     json_rep = r.get(api).json()
     if not json_rep.get("success"):
-        await m.edit("FTS! something unusual happened, "
-                     + "report to support @Thepirategang")
+        await m.edit("`\"/wall\"` Needs A Keyword Argument!")
     else:
         wallpapers = json_rep.get("wallpapers")
         if not wallpapers:
             await m.edit("Found literally nothing!,"
                          + "You should work on your English.")
             return
-        else:
-            index = randint(0, len(wallpapers) - 1)
-            wallpaper = wallpapers[index]
-            wallpaper = wallpaper.get("url_image")
-            wallpaper = wallpaper.replace("\\", "")
-            await message.reply_document(wallpaper)
+        index = randint(0, len(wallpapers) - 1)
+        wallpaper = wallpapers[index]
+        wallpaper = wallpaper.get("url_image")
+        wallpaper = wallpaper.replace("\\", "")
+        await message.reply_document(wallpaper)
     await delete_message_with_delay(10, m)

+ 19 - 13
wbb/modules/misc.py

@@ -1,6 +1,6 @@
+from pyrogram.types import Message
 from wbb import app
 from wbb.utils import cust_filter, random_line
-from pyrogram.types import Message
 
 __MODULE__ = "Misc"
 __HELP__ = "/commit - Generate Funny Commit Messages\n" \
@@ -11,46 +11,52 @@ __HELP__ = "/commit - Generate Funny Commit Messages\n" \
 
 
 @app.on_message(cust_filter.command(commands=("commit")))
-async def commit(client, message: Message):
+async def commit(client, message: Message):  # pylint: disable=W0613
     await message.reply_text((await random_line('wbb/utils/commit.txt')))
 
 
 @app.on_message(cust_filter.command(commands=("runs")))
-async def runs(client, message: Message):
+async def runs(client, message: Message):  # pylint: disable=W0613
     await message.reply_text((await random_line('wbb/utils/runs.txt')))
 
 
 @app.on_message(cust_filter.command(commands=("quote")))
-async def quote(client, message: Message):
+async def quote(client, message: Message):  # pylint: disable=W0613
     await message.reply_text((await random_line('wbb/utils/quotes.txt')))
 
 
 @app.on_message(cust_filter.command(commands=("id")))
-async def id(client, message: Message):
+async def get_id(client, message: Message):  # pylint: disable=W0613
     app.set_parse_mode("markdown")
     if message.text != '/id':
         username = message.text.replace('/id', '')
-        id = (await app.get_users(username)).id
-        msg = f"{username}'s ID is `{id}`"
+        user_id = (await app.get_users(username)).id
+        msg = f"{username}'s ID is `{user_id}`"
         await message.reply_text(msg)
 
     elif message.text == '/id' and not bool(message.reply_to_message):
-        id = message.chat.id
-        msg = f"{message.chat.title}'s ID is `{id}`"
+        chat_id = message.chat.id
+        msg = f"{message.chat.title}'s ID is `{chat_id}`"
         await message.reply_text(msg)
 
     elif message.text == '/id' and bool(message.reply_to_message):
-        id = message.reply_to_message.from_user.id
-        msg = f"{message.reply_to_message.from_user.mention}'s ID is `{id}`"
+        from_user_id = message.reply_to_message.from_user.id
+        from_user_mention = message.reply_to_message.from_user.mention
+        msg = f"{from_user_mention}'s ID is `{from_user_id}`"
         await message.reply_text(msg)
 
 
 @app.on_message(cust_filter.command(commands=("dev")))
-async def dev(client, message: Message):
+async def dev(client, message: Message):  # pylint: disable=W0613
     app.set_parse_mode("markdown")
     await message.reply_to_message.forward('WBBSupport')
     await app.send_message("WBBSupport",
-                           f"Forwarded By ID: `{message.from_user.id}`")
+                           "Forwarded By: `{}` | {}\n"
+                           "Forwarded From: `{}` | {}"
+                           .format(message.from_user.id,
+                                   message.from_user.mention,
+                                   message.chat.id,
+                                   message.chat.title))
     await message.reply_text("Your Message Has Been Forward To Devs,"
                              + " Any Missuse Of This Feature Will Not"
                              + " Be Tolerated And You Will Be"

+ 3 - 3
wbb/modules/music.py

@@ -1,10 +1,10 @@
 from __future__ import unicode_literals
 from urllib.parse import urlparse
+import os
 import youtube_dl
+from pyrogram.types import Message
 from wbb.utils import cust_filter
 from wbb import app
-import os
-from pyrogram.types import Message
 
 __MODULE__ = "Music"
 __HELP__ = "/music [link] To Download Music From Various Websites"
@@ -16,7 +16,7 @@ ydl_opts = {
 
 
 @app.on_message(cust_filter.command(commands=("music")))
-async def music(client, message: Message):
+async def music(client, message: Message):  # pylint: disable=W0613
     await message.reply_chat_action("typing")
     app.set_parse_mode("html")
     try:

+ 5 - 5
wbb/modules/paste.py

@@ -1,7 +1,7 @@
-from wbb.utils import cust_filter, nekobin
-from wbb import app
 import os
 from pyrogram.types import Message
+from wbb.utils import cust_filter, nekobin
+from wbb import app
 
 
 __MODULE__ = "Paste"
@@ -9,7 +9,7 @@ __HELP__ = "/paste - To Paste Replied Text Or Document To Neokobin"
 
 
 @app.on_message(cust_filter.command(commands=("paste")))
-async def paste(client, message: Message):
+async def paste(client, message: Message):  # pylint: disable=W0613
     if bool(message.reply_to_message) is True:
         app.set_parse_mode("markdown")
         if bool(message.reply_to_message.text) is True:
@@ -23,8 +23,8 @@ async def paste(client, message: Message):
         elif bool(message.reply_to_message.document) is True:
             m = await message.reply_text("```Pasting To Nekobin...```")
             await message.reply_to_message.download(file_name='paste.txt')
-            f = open("downloads/paste.txt", "r")
-            paste_link = await nekobin.neko(f.read())
+            i = open("downloads/paste.txt", "r")
+            paste_link = await nekobin.neko(i.read())
             os.remove('downloads/paste.txt')
             final_link = f"[Nekobin]({paste_link})"
             await m.edit(final_link, disable_web_page_preview=True)

+ 7 - 7
wbb/modules/ping.py

@@ -1,19 +1,19 @@
-from wbb import app
-from wbb.utils import cust_filter
 import requests
 from pyrogram.types import Message
+from wbb import app
+from wbb.utils import cust_filter
 
 __MODULE__ = "Ping"
 __HELP__ = " /ping - To Get Response Time From All TG Datacenters"
 
 
 @app.on_message(cust_filter.command(commands=("ping")))
-async def ping(client, message: Message):
+async def ping(client, message: Message):  # pylint: disable=W0613
     app.set_parse_mode("markdown")
-    m = await message.reply_text("```Wait, Pinging all Datacenters```")
+    j = await message.reply_text("Wait, Pinging all Datacenters`")
     result = ""
     for i in range(1, 6):
-        dc = (f"https://cdn{i}.telesco.pe")
-        ping1 = round(requests.head(dc).elapsed.total_seconds() * 1000)
+        datacenter = (f"https://cdn{i}.telesco.pe")
+        ping1 = round(requests.head(datacenter).elapsed.total_seconds() * 1000)
         result += f'```DC{i} - {ping1}ms```'
-    await m.edit(result)
+    await j.edit(result)

+ 4 - 4
wbb/modules/repo.py

@@ -1,16 +1,16 @@
+from pyrogram.types import Message
 from wbb import app
 from wbb.utils import cust_filter
-from pyrogram.types import Message
 
 
 __MODULE__ = "Repo"
-__HELP__ = "/repo - To Get My Github Repository Link" + \
+__HELP__ = "/repo - To Get My Github Repository Link " + \
            "And Support Group Link"
 
 
 @app.on_message(cust_filter.command(commands=("repo")))
-async def repo(client, message: Message):
+async def repo(client, message: Message):  # pylint: disable=W0613
     app.set_parse_mode("markdown")
     await message.reply_text(
         "[Github](https://github.com/thehamkercat/WilliamButcherBot)"
-        + " | [Group](t.me/Thepirategang)", disable_web_page_preview=True)
+        + " | [Group](t.me/WBBSupport)", disable_web_page_preview=True)

+ 5 - 5
wbb/modules/rice.py

@@ -1,7 +1,7 @@
-from wbb import app
-from wbb.utils import cust_filter
 from pyrogram import filters
 from pyrogram.types import Message
+from wbb import app
+from wbb.utils import cust_filter
 
 
 __MODULE__ = "Rice"
@@ -10,13 +10,13 @@ __HELP__ = "/rice - To Forward Your Linux Rice To DE_WM's" \
 
 
 @app.on_message(filters.chat('DE_WM') & cust_filter.command(commands=("rice")))
-async def rice(client, message: Message):
+async def rice(client, message: Message):  # pylint: disable=W0613
     if bool(message.reply_to_message) is True:
         app.set_parse_mode("markdown")
-        id = message.reply_to_message.from_user.id
+        user_id = message.reply_to_message.from_user.id
         await message.reply_to_message.forward('RiceGallery')
         await message.reply_text(
-            f"[Your](tg://user?id={id}) Rice Forwared"
+            f"[Your](tg://user?id={user_id}) Rice Forwared"
             " To [Rice Gallery](https://t.me/RiceGallery)",
             disable_web_page_preview=True)
 

+ 20 - 19
wbb/modules/sudoers.py

@@ -1,12 +1,12 @@
-from wbb.utils import cust_filter, nekobin, formatter
-from wbb import app, OWNER_ID, SUDO_USER_ID, bot_start_time, NEOFETCH
+import os
+import re
+import time
 from pyrogram import filters, types
 from pyrogram.types import Message
-import re
 import speedtest
 import psutil
-import time
-import os
+from wbb.utils import cust_filter, nekobin, formatter
+from wbb import app, OWNER_ID, SUDO_USER_ID, bot_start_time, NEOFETCH
 
 __MODULE__ = "Sudoers"
 __HELP__ = '''
@@ -22,7 +22,7 @@ SUDOERS = [OWNER_ID, SUDO_USER_ID]
 
 
 @app.on_message(filters.user(SUDOERS) & cust_filter.command("log"))
-async def logs_chat(client, message: Message):
+async def logs_chat(client, message: Message):  # pylint: disable=W0613
     keyb = types.InlineKeyboardMarkup(
         [
             [
@@ -48,8 +48,8 @@ logs_create = filters.create(logs_callback)
 @app.on_callback_query(logs_create)
 async def paste_log_neko(client, query):
     if query.from_user.id == OWNER_ID or SUDO_USER_ID:
-        f = open("error.log", "r")
-        data = await nekobin.neko(f.read())
+        j = open("error.log", "r")
+        data = await nekobin.neko(j.read())
         keyb = types.InlineKeyboardMarkup(
             [[types.InlineKeyboardButton("Pasted!", url=f"{data}")]]
         )
@@ -77,17 +77,18 @@ def speed_convert(size):
 @app.on_message(
     filters.user(SUDOERS) & cust_filter.command(commands=("speedtest"))
 )
-async def speeeed(client, message: Message):
+async def get_speedtest_result(client,  # pylint: disable=W0613
+                               message: Message):
     app.set_parse_mode("markdown")
     m = await message.reply_text("```Performing A Speedtest!```")
     speed = speedtest.Speedtest()
-    x = speed.get_best_server()
-    y = speed.download()
-    z = speed.upload()
+    i = speed.get_best_server()
+    j = speed.download()
+    k = speed.upload()
     await m.edit(f'''
-```Download - {speed_convert(y)}
-Upload   - {speed_convert(z)}
-Latency  - {round((x["latency"]))} ms
+```Download - {speed_convert(j)}
+Upload   - {speed_convert(k)}
+Latency  - {round((i["latency"]))} ms
 ```''')
 
 # Stats Module
@@ -96,21 +97,21 @@ Latency  - {round((x["latency"]))} ms
 @ app.on_message(
     filters.user(SUDOERS) & cust_filter.command(commands=("stats"))
 )
-async def stats(client, message: Message):
+async def get_stats(client, message: Message):  # pylint: disable=W0613
     bot_uptime = int(time.time() - bot_start_time)
     cpu = psutil.cpu_percent(interval=0.5)
     mem = psutil.virtual_memory().percent
     disk = psutil.disk_usage("/").percent
     if NEOFETCH == "True":
         os.system("neofetch --stdout > neofetch.txt")
-        f = open("neofetch.txt", "r")
-        read_file = f.read()
+        i = open("neofetch.txt", "r")
+        read_file = i.read()
         neofetch = (f'''
 ----------[Neofetch]----------
 
 {read_file}
 ''')
-        f.close()
+        i.close()
     else:
         neofetch = "NeoFetch Is Disabled!"
     stats = (f'''

+ 2 - 148
wbb/utils/formatter.py

@@ -1,65 +1,3 @@
-import time
-import math
-
-
-def time_formatter(seconds):
-    minutes, seconds = divmod(seconds, 60)
-    hours, minutes = divmod(minutes, 60)
-    days, hours = divmod(hours, 24)
-    tmp = (
-        ((str(days) + " day(s), ") if days else "")
-        + ((str(hours) + " hour(s), ") if hours else "")
-        + ((str(minutes) + " minute(s), ") if minutes else "")
-        + ((str(seconds) + " second(s), ") if seconds else "")
-    )
-    return tmp[:-2]
-
-
-def time_parser(start, end):
-    time_end = end - start
-    month = time_end // 2678400
-    days = time_end // 86400
-    hours = time_end // 3600 % 24
-    minutes = time_end // 60 % 60
-    seconds = time_end % 60
-    times = ""
-    if month:
-        times += "{} month, ".format(month)
-    if days:
-        times += "{} days, ".format(days)
-    if hours:
-        times += "{} hours, ".format(hours)
-    if minutes:
-        times += "{} minutes, ".format(minutes)
-    if seconds:
-        times += "{} seconds".format(seconds)
-    if times == "":
-        times = "{} miliseconds".format(time_end)
-    return times
-
-
-def time_parser_int(time_end):
-    month = time_end // 2678400
-    days = time_end // 86400
-    hours = time_end // 3600 % 24
-    minutes = time_end // 60 % 60
-    seconds = time_end % 60
-    times = ""
-    if month:
-        times += "{} month, ".format(month)
-    if days:
-        times += "{} days, ".format(days)
-    if hours:
-        times += "{} hours, ".format(hours)
-    if minutes:
-        times += "{} minutes, ".format(minutes)
-    if seconds:
-        times += "{} seconds".format(seconds)
-    if times == "":
-        times = "{} miliseconds".format(time_end)
-    return times[:-2] if times[-2:] == ", " else times
-
-
 def get_readable_time(seconds: int) -> str:
     count = 0
     ping_time = ""
@@ -75,94 +13,10 @@ def get_readable_time(seconds: int) -> str:
             break
         time_list.append(int(result))
         seconds = int(remainder)
-    for x in range(len(time_list)):
-        time_list[x] = str(time_list[x]) + time_suffix_list[x]
+    for i in range(len(time_list)):
+        time_list[i] = str(time_list[i]) + time_suffix_list[i]
     if len(time_list) == 4:
         ping_time += time_list.pop() + ", "
     time_list.reverse()
     ping_time += ":".join(time_list)
     return ping_time
-
-
-def convert_size(size_bytes):
-    if size_bytes == 0:
-        return "0B"
-    size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")
-    i = int(math.floor(math.log(size_bytes, 1024)))
-    p = math.pow(1024, i)
-    s = round(size_bytes / p, 2)
-    return "%s %s" % (s, size_name[i])
-
-
-def extract_time(time_val):
-    if not any(time_val.endswith(unit) for unit in ("m", "h", "d")):
-        return False
-    unit = time_val[-1]
-    time_num = time_val[:-1]  # type: str
-    if not time_num.isdigit():
-        return False
-
-    if unit == "d":
-        bantime = int(time.time() + int(time_num) * 24 * 60 * 60)
-    elif unit == "h":
-        bantime = int(time.time() + int(time_num) * 60 * 60)
-    elif unit == "m":
-        bantime = int(time.time() + int(time_num) * 60)
-    else:
-        return False
-    return bantime
-
-
-def extract_time_set(time_val):
-    if not any(time_val.endswith(unit) for unit in ("m", "h", "d")):
-        return False
-    unit = time_val[-1]
-    time_num = time_val[:-1]  # type: str
-    if not time_num.isdigit():
-        return False
-    if unit == "d":
-        bantime = int(int(time_num) * 24 * 60 * 60)
-    elif unit == "h":
-        bantime = int(int(time_num) * 60 * 60)
-    elif unit == "m":
-        bantime = int(int(time_num) * 60)
-    else:
-        return False
-    return bantime
-
-
-def escape_invalid_curly_brackets(text, valids):  # sourcery skip
-    new_text = ""
-    idx = 0
-    while idx < len(text):
-        if text[idx] == "{":
-            if idx + 1 < len(text) and text[idx + 1] == "{":
-                idx += 2
-                new_text += "{{{{"
-                continue
-            else:
-                success = False
-                for v in valids:
-                    if text[idx:].startswith("{" + v + "}"):
-                        success = True
-                        break
-                    if success:
-                        new_text += text[idx: idx + len(v) + 2]
-                        idx += len(v) + 2
-                        continue
-                    else:
-                        new_text += "{{"
-
-        elif text[idx] == "}":
-            if idx + 1 < len(text) and text[idx + 1] == "}":
-                idx += 2
-                new_text += "}}}}"
-                continue
-            else:
-                new_text += "}}"
-
-        else:
-            new_text += text[idx]
-        idx += 1
-
-    return new_text

+ 6 - 6
wbb/utils/misc.py

@@ -40,13 +40,13 @@ def paginate_modules(page_n, module_dict, prefix, chat=None):
         )
 
     pairs = list(zip(modules[::3], modules[1::3], modules[2::3]))
-    c = 0
-    for x in pairs:
-        for _ in x:
-            c += 1
-    if len(modules) - c == 1:
+    i = 0
+    for m in pairs:
+        for _ in m:
+            i += 1
+    if len(modules) - i == 1:
         pairs.append((modules[-1],))
-    elif len(modules) - c == 2:
+    elif len(modules) - i == 2:
         pairs.append(
             (
                 modules[-2],

+ 3 - 3
wbb/utils/nekobin.py

@@ -2,11 +2,11 @@ import aiohttp
 
 
 async def neko(data):
-    BASE_URL = "https://nekobin.com"
+    base_url = "https://nekobin.com"
     async with aiohttp.ClientSession() as session:
         async with session.post(
-            f"{BASE_URL}/api/documents", json={"content": data}, timeout=3
+            f"{base_url}/api/documents", json={"content": data}, timeout=3
         ) as response:
             key = (await response.json())["result"]["key"]
-            reply = f"{BASE_URL}/{key}"
+            reply = f"{base_url}/{key}"
     return reply