Was bored. Started messing around with native async/await in Rust, wanted to test it out whilst writing a discord library.
```rust use { std::{env, io}, railgun::{Client, register} }
async fn on_message(client: &Client, message: Message) -> Option
if message.content.starts_with("?ping") {
client.send(&message.channel, "Pong!").await?;
}
None
}
async fn main() { Client::default() .mount(register![onmessage]) .run(env::var("DISCORDTOKEN")).await .expect("Could not start discord client."); } ```