text: import re
  from typing import List, Union
  from pyrogram.filters import create
  from pyrogram.types import Message
  from configparser import ConfigParser
  from scp import core
  
  config = ConfigParser()
  config.read('config.ini')
  prefixes = config.get('scp-5170', 'prefixes').split()
  
  
  def command(commands: Union[str, List[str]], prefixes: Union[str, List[str]] = prefixes, case_sensitive: bool = False):
      """Filter commands, i.e.: text messages starting with "/" or any other custom prefix.
      Parameters:
          commands (``str`` | ``list``):
              The command or list of commands as string the filter should look for.
              Examples: "start", ["start", "help", "settings"]. When a message text containing
              a command arrives, the command itself and its arguments will be stored in the *command*
              field of the :obj:`~pyrogram.types.Message`.
          prefixes (``str`` | ``list``, *optional*):
              A prefix or a list of prefixes as string the filter should look for.
              Defaults to "/" (slash). Examples: ".", "!", ["/", "!", "."], list(".:!").
              Pass None or "" (empty string) to allow commands with no prefix at all.
          case_sensitive (``bool``, *optional*):
              Pass True if you want your command(s) to be case sensitive. Defaults to False.
              Examples: when True, command="Start" would trigger /Start but not /start.
      """
      command_re = re.compile(r"([\"'])(.*?)(?<!\\)\1|(\S+)")
  
      async def func(flt, client: core.clients.Client, message: Message):
          username = client.me.username or ''
          text = message.text or message.caption
          message.command = None
  
          if not text:
              return False
  
          for prefix in flt.prefixes:
              if not text.startswith(prefix):
                  continue
  
              without_prefix = text[len(prefix):]
  
              for cmd in flt.commands:
                  if not re.match(
                      rf'^(?:{cmd}(?:@?{username})?)(?:\s|$)',
                      without_prefix, flags=0 if flt.case_sensitive else re.IGNORECASE,
                  ):
                      continue
  
                  without_command = re.sub(
                      rf'{cmd}(?:@?{username})?\s?', '', without_prefix,
                      count=1, flags=0 if flt.case_sensitive else re.IGNORECASE,
                  )
                  message.command = [cmd] + [
                      re.sub(r"\\([\"'])", r'\1', m.group(2) or m.group(3) or '')
                      for m in command_re.finditer(without_command)
                  ]
                  return True
  
          return False
  
      commands = commands if isinstance(commands, list) else [commands]
      commands = {c if case_sensitive else c.lower() for c in commands}
  
      prefixes = [] if prefixes is None else prefixes
      prefixes = prefixes if isinstance(prefixes, list) else [prefixes]
      prefixes = set(prefixes) if prefixes else {''}
  
      return create(
          func,
          'CommandFilter',
          commands=commands,
          prefixes=prefixes,
          case_sensitive=case_sensitive,
      )
  