aboutsummaryrefslogtreecommitdiff
path: root/src/commands/meme/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/meme/mod.rs')
-rw-r--r--src/commands/meme/mod.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/commands/meme/mod.rs b/src/commands/meme/mod.rs
index e5244aa..1761ab1 100644
--- a/src/commands/meme/mod.rs
+++ b/src/commands/meme/mod.rs
@@ -1,7 +1,9 @@
use diesel::PgConnection;
+use log::debug;
use rand::{Rng, thread_rng};
use serenity::{
builder::CreateMessage,
+ framework::standard::macros::group,
http::AttachmentType,
model::channel::Message,
prelude::*,
@@ -28,6 +30,27 @@ mod create;
mod invoke;
mod delete;
+group!({
+ name: "memes",
+ options: {
+ only_in: "guild",
+ },
+ commands: [
+ meme,
+ audio_meme,
+ silent_Meme,
+ addmeme,
+ addaudiomeme,
+ delmeme,
+ wat,
+ stats,
+ history,
+ rare_meme,
+ memers,
+ query,
+ ],
+});
+
fn send_meme(ctx: &Context, t: &Meme, conn: &PgConnection, msg: &Message) -> Result<()> {
let should_tts = t.content.as_ref().map(|t| t.len() > 0).unwrap_or(false) &&
thread_rng().gen::<u32>() % 25 == 0;