async def get_context(self, message, *, cls=Context):
view = StringView(message.content)<EOL>ctx = cls(prefix=None, view=view, bot=self, message=message)<EOL>if self._skip_check(message.author.id, self.user.id):<EOL><INDENT>return ctx<EOL><DEDENT>prefix = await self.get_prefix(message)<EOL>invoked_prefix = prefix<EOL>if isinstance(prefix, str):<EOL><INDENT>if not view.skip_string(prefix):<EOL><INDENT>return ctx<EOL><DEDENT><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>if message.content.startswith(tuple(prefix)):<EOL><INDENT>invoked_prefix = discord.utils.find(view.skip_string, prefix)<EOL><DEDENT>else:<EOL><INDENT>return ctx<EOL><DEDENT><DEDENT>except TypeError:<EOL><INDENT>if not isinstance(prefix, list):<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>".format(prefix.__class__.__name__))<EOL><DEDENT>for value in prefix:<EOL><INDENT>if not isinstance(value, str):<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>".format(value.__class__.__name__))<EOL><DEDENT><DEDENT>raise<EOL><DEDENT><DEDENT>invoker = view.get_word()<EOL>ctx.invoked_with = invoker<EOL>ctx.prefix = invoked_prefix<EOL>ctx.command = self.all_commands.get(invoker)<EOL>return ctx<EOL>
r"""|coro|

        Returns the invocation context from the message.

        This is a more low-level counter-part for :meth:`.process_commands`
        to allow users more fine grained control over the processing.

        The returned context is not guaranteed to be a valid invocation
        context, :attr:`.Context.valid` must be checked to make sure it is.
        If the context is not valid then it is not a valid candidate to be
        invoked under :meth:`~.Bot.invoke`.

        Parameters
        -----------
        message: :class:`discord.Message`
            The message to get the invocation context from.
        cls
            The factory class that will be used to create the context.
            By default, this is :class:`.Context`. Should a custom
            class be provided, it must be similar enough to :class:`.Context`\'s
            interface.

        Returns
        --------
        :class:`.Context`
            The invocation context. The type of this can change via the
            ``cls`` parameter.