You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the rotating server announcements are stored in announcements.txt in the directory that Dashboard runs. This has worked for a while, but makes it difficult to change the messages. This aims to fix that by storing those announcements in MongoDB and allowing them to be created, edited, and removed with commands.
Commands:
/announce create [id] [message] - This command creates a new announcement. The id must be unique (no other announcement may exist with the same case-insensitive id), and the message may contain color codes. By default, announcements are deactivated and are added at the bottom of the list.
/announce remove [id] - Delete an existing announcement. This cannot be undone. If you only want to take an announcement out of rotation, consider deactivating it instead of removing it.
/announce list - List all existing announcements and all relevant information for each.
/announce move [id] [up/down] - Announcements are displayed in a certain, consistent order. This command allows a message to be moved one position up or down in this list. If moving the announcement would put it outside the list (moving up from position 1, moving down from last position), it will be moved to the other end of the list (move down from last position places it in position 1).
/announce edit [id] [new message] - Update an existing announcement with a new message. This can be preferred to removing and creating a new announcement, since it wouldn't retain its position.
/announce activate [id] - Activate an announcement. The announcement's message will be included in the list of rotating announcements. Announcements are sent to all players on the server every five minutes.
/announce deactivate [id] - Deactivate an announcement. The announcement's message will be removed from the list of rotating announcements.
Database Storage:
Announcements are stored in the MongoDB database in the collection announcements with the format:
{
"id": "safe",
"message": "&aPlease keep your language &bsafe for little ears.",
"active": true
}
There will also be one document in the collection that doesn't follow this format - it stores the prefix of all announcements:
{
"prefix": "&f[&9✦&f] "
}
The text was updated successfully, but these errors were encountered:
Currently, the rotating server announcements are stored in
announcements.txt
in the directory that Dashboard runs. This has worked for a while, but makes it difficult to change the messages. This aims to fix that by storing those announcements in MongoDB and allowing them to be created, edited, and removed with commands.Commands:
Database Storage:
Announcements are stored in the MongoDB database in the collection
announcements
with the format:There will also be one document in the collection that doesn't follow this format - it stores the prefix of all announcements:
The text was updated successfully, but these errors were encountered: