This command lets users ask a question in the #q-and-a channel. The questions are automatically numbered and can be asked anonymously or display the author.
This command was introduced by SE21-Team2.
Changes made by CSC510-Group-25:
- Users can now use anon instead of anonymous (though anonymous still works)
- Users cannot ask empty/blank/whitespace only questions
The code that implements the above mentioned functionality is located in cogs/qanda.py.
askQuestion(self, ctx, qs: str, anonymous=''):
This function takes as arguments the values provided by the constructor through self, context in which the command was called, the question string, and the anonymous option.
You are in the server that has the Classmate Bot active and online. You go to
the #q-and-a channel, enter the command ask
and type the question in quotes. If you want the
question to be displayed anonymously, you can add the option anonymous
to the end of the
command.
$ask "QUESTION" anonymous_<optional>_
$ask "When is the exam?" anonymous
$ask "When is the project due?"
Successful execution of this command will delete the user's original message and the bot will send a new message with the question.