Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

Unable to test command that requires quoted arg #30

@Fuzzwah

Description

@Fuzzwah

My discord bot has a command that returns an image and is triggered using something like:

!trigger option "firstname lastname" "second person"

The target bot works fine, and using the quotes successfully informs the bot which words are all part of a single name as it sees them as a single arg.

I've attempted to configure a test using:

await interface.assert_reply_has_image('!trigger option "firstname lastname" "second person"')

But the quote marks get stripped out.

I tried escaping the quotes with both 1 and 3 backslashes, but neither worked as the test bot threw the error:

raise SyntaxError("Invalid Number of Arguments")

With out the quotes the command fails because it thinks that each work (firstname, lastname, second, person) are each complete names.

Any tips on how I can test using quoted args?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions