Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1.87 KB

deleteAllQA.md

File metadata and controls

38 lines (25 loc) · 1.87 KB

About $deleteAllQA (New Project 3 Command)

Deletes all questions and answers from the database and channel (for that server only), including ghost (hidden) and zombie (deleted) questions. Instructor only. Note: may take some time to complete.

Zombies are questions that were manually deleted from the channel. They need to be
assigned new message IDs in order to be restored--that is, they need to be reposted.
Ghosts are questions that were deleted (or hidden) with the deleteQuestion command.
Because their message IDs remain the same, their contents can just be unhidden.

Changes

This command was introduced by CSC510-Group-25.

Location of Code

The code that implements the above mentioned functionality is located in cogs/qanda.py.

Code Description

Functions

deleteAllQAs(self, ctx):
This function takes as arguments the values provided by the constructor through self and the context in which the command was called.

How to run it? (Small Example)

You are in the server that has the Classmate Bot active and online. You go to the #q-and-a channel and enter the command $deleteAllQA.

$deleteAllQA

Successful execution of this command will remove all questions and answers from the QA channel and database.

The bot will then DM the user the number of questions that have been deleted.