Skip to content
This repository has been archived by the owner on Oct 25, 2019. It is now read-only.

Commit

Permalink
These are not the droids you're looking for.
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain Gautier committed Mar 28, 2017
1 parent 42f7b5a commit e130479
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ use vending::{ItemOnSale, BuyingItem};

use std::sync::Arc;

use std::env;

fn look_for_sale(vending_api: VendingApi, name: String) -> impl Future<Item=Vec<ItemOnSale>, Error=VendingApiError> {
vending_api.vending()
.map(move |items| {
Expand Down Expand Up @@ -56,7 +58,7 @@ fn look_for_buying(vending_api: VendingApi, name: String) -> impl Future<Item=Ve
}

fn main() {
let token_bot = "Mjk1ODkwNjk4NDE3MzQwNDE3.C7qTWA.uNinGhRhSMj3sun83Ke_uIF4kjw";
let token_bot = &env::var("ROM_DISCORD_TOKEN").expect("Unable to find discord bot token from env var. Please check env var ROM_DISCORD_TOKEN is correctly setup.");

let discord = Discord::from_bot_token(&token_bot).expect("Unable to make bot from token.");
let discord = Arc::new(discord);
Expand All @@ -67,7 +69,6 @@ fn main() {

println!("Ready.");


loop {
match connection.recv_event() {
Ok(Event::MessageCreate(message)) => {
Expand Down

0 comments on commit e130479

Please sign in to comment.