athphane / userbot

Function with cyclomatic complexity higher than threshold PY-R1000
Anti-pattern
Minor
6 months ago6 months old
who_is has a cyclomatic complexity of 16 with "high" risk
 79
 80
 81@UserBot.on_message(filters.command("whois", [".", ""]) & filters.me)
 82async def who_is(bot: UserBot, message: Message): 83    cmd = message.command
 84    if not message.reply_to_message and len(cmd) == 1:
 85        get_user = message.from_user.id
define has a cyclomatic complexity of 24 with "high" risk
  9
 10
 11@UserBot.on_message(filters.command(["define", "dict"], ".") & filters.me)
 12async def define(bot: UserBot, message: Message): 13    """ Thank you Poki!!"""
 14    cmd = message.command
 15
get_id has a cyclomatic complexity of 20 with "high" risk
 39
 40
 41@UserBot.on_message(filters.command("id", ".") & filters.me)
 42async def get_id(bot: UserBot, message: Message): 43    file_id = None
 44    user_id = None
 45