cargo fmt
This commit is contained in:
parent
9e9eb48025
commit
6aff34ceab
6 changed files with 178 additions and 153 deletions
20
src/main.rs
20
src/main.rs
|
@ -10,10 +10,8 @@ type PrefixContext<'a> = poise::PrefixContext<'a, Data, Error>;
|
|||
pub struct Data {}
|
||||
|
||||
use commands::{challenge::*, kanji::*, meta::*, owner::*};
|
||||
use poise::serenity_prelude::{
|
||||
model::gateway::GatewayIntents
|
||||
};
|
||||
use poise::serenity_prelude as serenity;
|
||||
use poise::serenity_prelude::model::gateway::GatewayIntents;
|
||||
|
||||
#[poise::command(prefix_command)]
|
||||
async fn register(ctx: Context<'_>) -> Result<(), Error> {
|
||||
|
@ -36,7 +34,6 @@ async fn main() {
|
|||
.options(poise::FrameworkOptions {
|
||||
commands: vec![
|
||||
register(),
|
||||
|
||||
// owner
|
||||
sleep(),
|
||||
setsubmissionchannel(),
|
||||
|
@ -45,17 +42,14 @@ async fn main() {
|
|||
announce(),
|
||||
announcechallenge(),
|
||||
rebuildsite(),
|
||||
|
||||
// challenge
|
||||
challenge(),
|
||||
submit(),
|
||||
images(),
|
||||
imagedelete(),
|
||||
suggest(),
|
||||
|
||||
// meta
|
||||
help(),
|
||||
|
||||
// kanji
|
||||
i(),
|
||||
joyo(),
|
||||
|
@ -63,7 +57,7 @@ async fn main() {
|
|||
kyoiku(),
|
||||
jlpt(),
|
||||
hyogai(),
|
||||
so()
|
||||
so(),
|
||||
],
|
||||
prefix_options: poise::PrefixFrameworkOptions {
|
||||
prefix: Some(env::var("PREFIX").expect("Expected a prefix in the environment")),
|
||||
|
@ -72,10 +66,12 @@ async fn main() {
|
|||
..Default::default()
|
||||
})
|
||||
.token(std::env::var("DISCORD_TOKEN").expect("Expected a token in the environment"))
|
||||
.intents(GatewayIntents::GUILD_MESSAGES
|
||||
| GatewayIntents::DIRECT_MESSAGES
|
||||
| GatewayIntents::MESSAGE_CONTENT
|
||||
| GatewayIntents::GUILDS)
|
||||
.intents(
|
||||
GatewayIntents::GUILD_MESSAGES
|
||||
| GatewayIntents::DIRECT_MESSAGES
|
||||
| GatewayIntents::MESSAGE_CONTENT
|
||||
| GatewayIntents::GUILDS,
|
||||
)
|
||||
.user_data_setup(move |_ctx, _ready, _framework| Box::pin(async move { Ok(Data {}) }));
|
||||
|
||||
framework.run().await.unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue