This command lets users answer a question in the #q-and-a channel. The answers are automatically appended to the question and the role (Instructor/Student) of the sender will be shown. The user can choose to display their name or answer the question anonymously.
The code that implements the above mentioned functionality is located in cogs/qanda.py.
answer(self, ctx, num, ans, anonymous=''):
This function takes as arguments the values provided by the constructor through self, context in which the command was called, the question number that is being answered, the answer 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 answer
along with the question number and answer text in quotes. If you want the answer to be displayed anonymously, you can add the option anonymous
to the end of the command.
$answer QUESTION_NUM "ANSWER" anonymous(optional)
$answer "The project is due on Nov 4" anonymous
$answer "The final essay is due on Dec 3"
Successful execution of this command will delete the user's original message and the bot will append the answer to the question it refers to.