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

Unable to test command that requires quoted arg #30

Open
Fuzzwah opened this issue Sep 20, 2020 · 0 comments
Open

Unable to test command that requires quoted arg #30

Fuzzwah opened this issue Sep 20, 2020 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Fuzzwah
Copy link

Fuzzwah commented Sep 20, 2020

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?

@Cobular Cobular added bug Something isn't working help wanted Extra attention is needed labels Apr 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants