Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.
Dylan Kok edited this page Jan 1, 2021 · 1 revision

For Chloe's eyes only UwU

This page contains documentation on how to add chat rooms and append chat messages to said chat rooms.

.create_chat_room (Adding Chatrooms)

This method creates a chat room by using a list of participants and takes in an additional argument to determine type.

import chat as chat

chat.create_chat_room(["5feafbbf4dbad8d4b8614958", "5fec8a85b11a8931d7656f06"], True)
# If creation was successful, returns the _id of the chatroom
# Otherwise, returns False

Options

This method has no options

Additional Notes

chat.create_chat_room(["5feafbbf4dbad8d4b8614958", "5fec8a85b11a8931d7656f06"], True)
#                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The first argument is of type list containing at least two UIDs. There is no validation done to ensure such validity exists, sic ensure that UIDs are valid before entering.

chat.create_chat_room(["5feafbbf4dbad8d4b8614958", "5fec8a85b11a8931d7656f06"], True)
#                                                                               ^^^^

The second argument is of type boolean. Where True, denotes that the chat is of "BOOKING" type, whereas False denotes that chat is of "UwU" type. An Exception will be thrown this argument is invalid.

注意! Basic python concept states that you can use this entire method as a variable, which I highly recommend you do.