From 0cddfc328979d6110f8eb4eebc7bd52d788b958f Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Mon, 25 May 2020 13:40:19 -0700 Subject: [PATCH] structures section now in its own page --- docs/structures.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/structures.md diff --git a/docs/structures.md b/docs/structures.md new file mode 100644 index 0000000..99c05c3 --- /dev/null +++ b/docs/structures.md @@ -0,0 +1,50 @@ +# Structures + +Below are various structures that client builds can expect to receive. +These are not representative of how instances internally store data but what a client can expect to receive from different API requests. + +1. Member + +``` +Member { + name: string + id: u64 + permissions: u64 + badges: List +} +``` + +2. Channel + +``` +Channel { + name: string + description: string + type: integer [1=Voice Channel, 2=Text Channel] +} +``` + +3. Message + +While `Message` responses don't specify what channel they belong a channel +does have to be used to request these so it's up to the client to store these +in a way that makes sense. + +``` +Message { + author: Member + date: u64 -> [unix timestamp since epoch] + content: string +} +``` + +4. Badge + +``` +Badge { + name: string + permissions: u64 + color: u32 +} + +```