Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass sentence or multiple words to multiple arguments? #448

Closed
DennisMinn opened this issue May 13, 2024 · 0 comments
Closed

How to pass sentence or multiple words to multiple arguments? #448

DennisMinn opened this issue May 13, 2024 · 0 comments

Comments

@DennisMinn
Copy link

I want to pass multiple arguments enclosed in either ' or ", but on the first argument is properly formatted, while the second argument is cut off. Is there a way to modify how the arguments is parsed?

class Bot(commands.Bot):
    def __init__(self):
        super().__init__(token='<access token>', prefix='!', initial_channels = ['<initial channel>'])

    @commands.command(name='addQA')
    async def add_qa(self, context: commands.Context, question: str, answer: str):
        print(question, answer)

Input from <initial channel> chatroom

!addQA "this is a question" "this is the answer"

Current Output

this is a question "this

Desired Output

this is a question this is the answer
@PythonistaGuild PythonistaGuild locked and limited conversation to collaborators May 13, 2024
@chillymosh chillymosh converted this issue into discussion #449 May 13, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant