Skip to content

Sample State

Chris Vo edited this page Jan 3, 2020 · 5 revisions
{
  entities: {
    users: {
      10: {
        id: 10,
        username: CurrySoup,
        serverIds: [1, 3]
      },
      11: {
        id: 11,
        username: NiceSoup,
        serverIds: [1, 2, 3]
      },
      12: {
        id: 12,
        username: SoupPurrMan,
        serverIds: [1]
      },
    },
    servers: {
      1: {
        id: 1,
        name: "Gaming with Friends",
        userIds: [10, 11, 12],
        ownerId: 10
      },
      2: {
        id: 2,
        name: "Chris's Server",
        userIds: [11],
        ownerId: 11
      },
      3: {
        id: 3,
        name: "School and Stuff",
        userIds: [10, 11],
        ownerId: 10
      }
    },
    affiliations: {
      20: {
        id: 20,
        user_id: 10,
        server_id: 1
      },
      21: {
        id: 21,
        user_id: 10,
        server_id: 2
      },
      22: {
        id: 22,
        user_id: 11,
        server_id: 1
      },
      23: {
        id: 23,
        user_id: 11,
        server_id: 2
      },
      24: {
        id: 24,
        user_id: 11,
        server_id: 3
      },
      25: {
        id: 25
        user_id: 12,
        server_id: 1
      }
    },
    messages: {
      1200: {
        id: 1200,
        body: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        author_id: 10,
        server_id: 2,
      },
      1201: {
        id: 1201,
        body: "@here Do you guys want to play some Overwatch?",
        author_id: 11,
        server_id: 1
      },
      1202: {
        id: 1202,
        body: "I'm down after I finish my homework!",
        author_id: 12,
        server_id: 1
      },
      1203: {
        id: 1203,
        body: "@CurrySoup Dude, how did you do #3 on today's homework?",
        author_id: 11,
        server_id: 3
      }
    },
    channels: {
      30: {
        id: 30,
        name: "General",
        type: "Text",
        server_id: 1
      },
      31: {
        id: 31,
        name: "Game",
        type: "Voice",
        server_id: 1
      },
      30: {
        id: 32,
        name: "Study and Chill",
        type: "Voice",
        server_id: 3
      },
      33: {
        id: 33,
        name: "Hello World!",
        type: "Text",
        server_id: 2
      },
    },
    directMessages: {
      5: {
        id: 5,
        body: "Hey man",
        author_id: 11,
        recipient_id: 10
      },
      6: {
        id: 6,
        body: "How did you do #3 on today's homework?",
        author_id: 11,
        recipient_id: 10
      },
      7: {
        id: 7,
        body: "So I applied this specific formula to get another equation...",
        author_id: 10,
        recipient_id: 11
      },
      8: {
        id: 8,
        body: "Why is Doomfist so broken??",
        author_id: 12,
        recipient_id: 11
      }
    }
  },
       
}   
Clone this wiki locally