mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-18 16:28:55 +00:00
Base for community
This commit is contained in:
parent
333d6d8baa
commit
068fdc8974
5 changed files with 21 additions and 4 deletions
13
youmubot/src/commands/community/mod.rs
Normal file
13
youmubot/src/commands/community/mod.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
use serenity::framework::standard::macros::group;
|
||||
|
||||
mod votes;
|
||||
|
||||
use votes::VOTE_COMMAND;
|
||||
|
||||
group!({
|
||||
name: "community",
|
||||
options: {
|
||||
description: "Community related commands. Usually comes with some sort of delays, since it involves pinging",
|
||||
},
|
||||
commands: [vote],
|
||||
});
|
|
@ -14,17 +14,15 @@ use serenity::{
|
|||
|
||||
mod images;
|
||||
mod names;
|
||||
mod votes;
|
||||
|
||||
use images::*;
|
||||
use votes::VOTE_COMMAND;
|
||||
|
||||
group!({
|
||||
name: "fun",
|
||||
options: {
|
||||
description: "Random commands",
|
||||
},
|
||||
commands: [roll, pick, name, vote, image, nsfw],
|
||||
commands: [roll, pick, name, image, nsfw],
|
||||
});
|
||||
|
||||
#[command]
|
||||
|
|
|
@ -10,9 +10,11 @@ use std::collections::HashSet;
|
|||
mod args;
|
||||
|
||||
pub mod admin;
|
||||
pub mod community;
|
||||
pub mod fun;
|
||||
|
||||
pub use admin::ADMIN_GROUP;
|
||||
pub use community::COMMUNITY_GROUP;
|
||||
pub use fun::FUN_GROUP;
|
||||
|
||||
// A help command
|
||||
|
|
|
@ -115,9 +115,13 @@ fn setup_framework(mut client: Client) -> Client {
|
|||
c.delay(120 /* 2 minutes */).time_span(120).limit(1)
|
||||
})
|
||||
.bucket("images", |c| c.time_span(60).limit(2))
|
||||
.bucket("community", |c| {
|
||||
c.delay(30).time_span(30).limit(1)
|
||||
})
|
||||
// groups here
|
||||
.group(&commands::ADMIN_GROUP)
|
||||
.group(&commands::FUN_GROUP),
|
||||
.group(&commands::FUN_GROUP)
|
||||
.group(&commands::COMMUNITY_GROUP),
|
||||
);
|
||||
client
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue