From 49af4053df8e40d584c43f856e4d6bb3b8432698 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Wed, 14 Feb 2018 02:56:09 -0500 Subject: thulani leaves when he is done playing --- src/util.rs | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/util.rs') diff --git a/src/util.rs b/src/util.rs index 54f10ee..4c59704 100644 --- a/src/util.rs +++ b/src/util.rs @@ -2,10 +2,6 @@ use std::env; use std::str::FromStr; use serenity::model::permissions::Permissions; -use serenity::model::id::GuildId; -use serenity::model::channel::Message; -use serenity::client::CACHE; - use url::Url; lazy_static! { @@ -36,13 +32,3 @@ pub fn must_env_lookup(s: &str) -> T { env::var(s).expect(&format!("missing env var {}", s)) .parse::().unwrap_or_else(|_| panic!(format!("bad format for {}", s))) } - -pub trait GuildLookup { - fn guild_id(&self) -> Option; -} - -impl GuildLookup for Message { - fn guild_id(&self) -> Option { - CACHE.read().guild_channel(self.channel_id).map(|c| c.read().guild_id) - } -} \ No newline at end of file -- cgit v1.3.1