mirror of
https://github.com/Noratrieb/discord-court-bot.git
synced 2026-01-17 03:15:01 +01:00
submodules handlers
This commit is contained in:
parent
d9ca14c642
commit
0605eda466
2 changed files with 305 additions and 324 deletions
|
|
@ -44,7 +44,7 @@ async fn main() -> Result<()> {
|
|||
|
||||
let token = env::var("DISCORD_TOKEN").wrap_err("DISCORD_TOKEN not found in environment")?;
|
||||
let dev_guild_id = if env::var("DEV").is_ok() {
|
||||
Some(serenity::GuildId(
|
||||
Some(GuildId(
|
||||
env::var("GUILD_ID")
|
||||
.wrap_err("GUILD_ID not found in environment, must be set when DEV is set")?
|
||||
.parse()
|
||||
|
|
@ -106,7 +106,7 @@ async fn main() -> Result<()> {
|
|||
})
|
||||
})
|
||||
.options(poise::FrameworkOptions {
|
||||
commands: vec![handler::lawsuit(), handler::prison(), hello()],
|
||||
commands: vec![handler::lawsuit::lawsuit(), handler::prison::prison(), hello()],
|
||||
on_error: |err| Box::pin(async { handler::error_handler(err).await }),
|
||||
listener: |ctx, event, ctx2, data| {
|
||||
Box::pin(async move { handler::listener(ctx, event, ctx2, data).await })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue