aboutsummaryrefslogtreecommitdiff
path: root/src/commands/meme.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/meme.rs')
-rw-r--r--src/commands/meme.rs32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/commands/meme.rs b/src/commands/meme.rs
index de64ad5..6d50349 100644
--- a/src/commands/meme.rs
+++ b/src/commands/meme.rs
@@ -1,21 +1,29 @@
use std::sync::RwLock;
+use diesel::PgConnection;
+use failure::Error;
+use lazy_static::lazy_static;
+use rand::{Rng, thread_rng};
use serenity::{
- http::AttachmentType,
builder::CreateMessage,
framework::standard::Args,
+ http::AttachmentType,
+ model::channel::Message,
+ prelude::*,
};
-use rand::{thread_rng, Rng};
-use diesel::PgConnection;
-use failure::Error;
-use lazy_static::lazy_static;
-
-use super::*;
-use super::playback::CtxExt;
-
-use crate::db::*;
-use crate::Result;
+use crate::{
+ commands::{
+ playback::{
+ CtxExt,
+ PlayArgs,
+ PlayQueue,
+ },
+ send,
+ },
+ db::*,
+ Result,
+};
lazy_static! {
static ref LAST_MEME: RwLock<Option<i32>> = RwLock::new(None);
@@ -28,7 +36,7 @@ fn update_meme(meme: &Meme) -> Result<()> {
Ok(())
}
-pub fn meme(ctx: &mut Context, msg: &Message, mut args: Args) -> Result<()> {
+pub fn meme(ctx: &mut Context, msg: &Message, args: Args) -> Result<()> {
if args.len() == 0 {
return rand_meme(ctx, msg);
}