feat: group meme command
This commit is contained in:
parent
52b9b6f968
commit
a709598cf6
18
src/botv2/cmd/meme/main.rs
Normal file
18
src/botv2/cmd/meme/main.rs
Normal file
@ -0,0 +1,18 @@
|
||||
use crate::botv2::{
|
||||
cmd::meme::{answer::answer, enable::enable, list::list},
|
||||
init::{Context, Error},
|
||||
};
|
||||
use tracing::instrument;
|
||||
|
||||
/// Handle meme command
|
||||
#[instrument(skip(ctx), level = "info", fields(channel = ctx.channel_id().get(), guild = ?ctx.guild_id().unwrap().get()))]
|
||||
#[poise::command(
|
||||
slash_command,
|
||||
prefix_command,
|
||||
category = "mem",
|
||||
subcommands("answer", "enable", "list"),
|
||||
guild_only = true
|
||||
)]
|
||||
pub async fn meme(ctx: Context<'_>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
pub mod answer;
|
||||
pub mod enable;
|
||||
pub mod list;
|
||||
pub mod main;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use super::init::{Data, Error};
|
||||
use poise::serenity_prelude as serenity;
|
||||
use tracing::{info, instrument};
|
||||
|
||||
#[allow(clippy::single_match)]
|
||||
#[instrument(skip(_ctx, _framework, _data), err, level = "trace")]
|
||||
pub async fn event_handler(
|
||||
_ctx: &serenity::Context,
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::botv2::cmd::meme::{answer::answer, enable::enable, list::list};
|
||||
use crate::botv2::cmd::meme::main::meme;
|
||||
use crate::botv2::cmd::server_config::server::server;
|
||||
use crate::botv2::cmd::{help::help, ping::ping};
|
||||
use crate::config::Config;
|
||||
@ -67,16 +67,7 @@ pub async fn start_bot(
|
||||
let prefix = config.prefix.clone();
|
||||
let framework = poise::Framework::builder()
|
||||
.options(poise::FrameworkOptions {
|
||||
commands: vec![
|
||||
age(),
|
||||
ping(),
|
||||
help(),
|
||||
list(),
|
||||
enable(),
|
||||
answer(),
|
||||
server(),
|
||||
concour(),
|
||||
],
|
||||
commands: vec![age(), ping(), help(), meme(), server(), concour()],
|
||||
prefix_options: poise::PrefixFrameworkOptions {
|
||||
prefix: Some(prefix),
|
||||
..Default::default()
|
||||
|
Loading…
Reference in New Issue
Block a user