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 +} + +```