def dm_only():
def predicate(ctx):<EOL><INDENT>if ctx.guild is not None:<EOL><INDENT>raise PrivateMessageOnly()<EOL><DEDENT>return True<EOL><DEDENT>return check(predicate)<EOL>
A :func:`.check` that indicates this command must only be used in a
    DM context only. Only private messages are allowed when
    using the command.

    This check raises a special exception, :exc:`.PrivateMessageOnly`
    that is inherited from :exc:`.CheckFailure`.

    .. versionadded:: 1.1.0