1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//! Library for interacting with the Discord API and Gateway, especially for bots, using hyper/tokio.

#![warn(missing_docs)]

/// Objects for sending messages
pub mod builder;
mod client;
mod error;
/// Events and related objects
pub mod events;
mod types;

pub use builder::{EmbedBuilder, MessageBuilder};
pub use client::{Client, GatewayConnection, ListAnchor};
pub use error::Error;
pub use events::Event;
pub use types::*;

use serde_derive::{Deserialize, Serialize};

#[derive(Deserialize, Serialize)]
struct DiscordBasePayload<I> {
    pub op: u8,
    pub d: I,
}