feat: add ask for new meme and init list
This commit is contained in:
parent
e9cb9ed211
commit
4fb0174c99
21
src/bot/cmd/meme/ask.rs
Normal file
21
src/bot/cmd/meme/ask.rs
Normal file
@ -0,0 +1,21 @@
|
||||
use serenity::{
|
||||
all::Message,
|
||||
client::Context,
|
||||
framework::standard::{macros::command, CommandResult},
|
||||
};
|
||||
|
||||
#[command]
|
||||
#[description = "Info to ask for new meme"]
|
||||
pub async fn ask(ctx: &Context, msg: &Message) -> CommandResult {
|
||||
if let Err(why) = msg
|
||||
.channel_id
|
||||
.say(
|
||||
&ctx.http,
|
||||
"Hi, if you want to add new meme to the bot, you need to ask batleforc to add new one. You can do it by sending a message to him.",
|
||||
)
|
||||
.await
|
||||
{
|
||||
println!("Error sending message: {:?}", why)
|
||||
}
|
||||
Ok(())
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
use super::{answer::ANSWER_COMMAND, enable::ENABLE_COMMAND};
|
||||
use super::{answer::ANSWER_COMMAND, ask::ASK_COMMAND, enable::ENABLE_COMMAND, list::LIST_COMMAND};
|
||||
use serenity::all::standard::macros::group;
|
||||
|
||||
// Include the meme commands
|
||||
@ -10,6 +10,6 @@ use serenity::all::standard::macros::group;
|
||||
#[prefixes("meme", "m")]
|
||||
#[summary = "Meme related commands"]
|
||||
#[description = "Commands to handle the meme related stuffs, it allow you to enable/disable the meme answer or to trigger a one time meme answer."]
|
||||
#[commands(enable, answer)]
|
||||
#[commands(enable, answer, ask, list)]
|
||||
#[default_command(answer)]
|
||||
pub struct Meme;
|
||||
|
21
src/bot/cmd/meme/list.rs
Normal file
21
src/bot/cmd/meme/list.rs
Normal file
@ -0,0 +1,21 @@
|
||||
use serenity::{
|
||||
all::Message,
|
||||
client::Context,
|
||||
framework::standard::{macros::command, CommandResult},
|
||||
};
|
||||
|
||||
#[command]
|
||||
#[description = "List supported meme keywords"]
|
||||
pub async fn list(ctx: &Context, msg: &Message) -> CommandResult {
|
||||
if let Err(why) = msg
|
||||
.channel_id
|
||||
.say(
|
||||
&ctx.http,
|
||||
"Soon TM - List of supported meme keywords will be available here.",
|
||||
)
|
||||
.await
|
||||
{
|
||||
println!("Error sending message: {:?}", why)
|
||||
}
|
||||
Ok(())
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
pub mod answer;
|
||||
pub mod ask;
|
||||
pub mod enable;
|
||||
pub mod init;
|
||||
pub mod list;
|
||||
|
Loading…
Reference in New Issue
Block a user