Easy JSON wrapper modfied to wrok with suggestions

Easy JSON wrapper modfied to wrok with suggestions.

This was made for small discord bots, for big bots you should not use this.

Clone this file into your project folder.

Add from suggester import SuggestionBoard to the top of your project.

board.add_suggestion(content: str, author: int)

Creates a suggestion in the draft category.

Will return the suggestions ID (sID).

"1234567890": {"content": content, "author": author}

board.approve_suggestion(sID: str)

Moves a suggestion from the draft category to the approved category.

Will raise:

  • NoSuchSuggestion: if there is not a suggestion with that sID.

  • SuggestionAlreadyApproved: if the suggestion was already approved.

  • SuggestionWasRejectedBefore: if the suggestion was rejected earlier.

board.reject_suggestion(sID: str)

Moves a suggestion from the draft category to the rejected category.

Will raise: