disruption 0.2.0

A light wrapper around the Discord API and gateway.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::channel::Message;

pub trait MessageCallback: Sized {
    fn handle_message(&self, msg: Message);
}

impl<F> MessageCallback for F
where
    F: Fn(Message),
{
    fn handle_message(&self, msg: Message) {
        self(msg);
    }
}