Skip to content

Commit ed778e7

Browse files
authored
Merge pull request #3 from c-git/develop
0.6.3
2 parents 305d6e2 + 277da23 commit ed778e7

File tree

16 files changed

+442
-389
lines changed

16 files changed

+442
-389
lines changed

Cargo.lock

Lines changed: 406 additions & 353 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bazooka-bot"
3-
version = "0.6.1"
4-
edition = "2021"
3+
version = "0.6.2"
4+
edition = "2024"
55
publish = false
66

77
[dependencies]
@@ -11,9 +11,9 @@ poise = "0.6.1"
1111
secrecy = "0.10.3"
1212
serde = { version = "1.0.219", features = ["derive"] }
1313
serde_json = "1.0.140"
14-
shuttle-runtime = { version = "0.53.0", default-features = false }
15-
shuttle-serenity = "0.53.0" # Since poise is a serenity command framework, it can run on Shuttle with shuttle-serenity
16-
shuttle-shared-db = { version = "0.53.0", default-features = false, features = ["sqlx", "postgres"] }
14+
shuttle-runtime = { version = "0.56.0", default-features = false }
15+
shuttle-serenity = "0.56.0" # Since poise is a serenity command framework, it can run on Shuttle with shuttle-serenity
16+
shuttle-shared-db = { version = "0.56.0", default-features = false, features = ["sqlx", "postgres"] }
1717
sqlx = { version = "0.8.5", default-features = false, features = ["postgres", "runtime-tokio-rustls"] }
1818
tracing = "0.1.41"
1919
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }

scripts/init_db.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ fi
7272
# Create the application database
7373
export DATABASE_URL=postgres://${APP_USER}:${APP_USER_PWD}@localhost:${DB_PORT}/${APP_DB_NAME}
7474
sqlx database create
75-
sqlx migrate run --source migrations_pg
75+
sqlx migrate run --source migrations
7676

7777
>&2 echo "Postgres has been migrated, ready to go!"

src/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ use poise::serenity_prelude::Mentionable;
44
use tracing::{error, info, instrument, warn};
55

66
use crate::{
7+
AuthorPreferredDisplay as _, Context, Data,
78
commands::{
89
general::{help, ping, register, uptime},
910
schedule::schedule,
1011
unranked_cmd::unranked,
1112
},
12-
AuthorPreferredDisplay as _, Context, Data,
1313
};
1414
pub use unranked_cmd::do_start_event;
1515
mod general;

src/commands/general.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use human_time::ToHumanTimeString as _;
44
use tracing::{info, instrument};
55

66
use crate::{
7-
commands::{tracing_handler_end, tracing_handler_start},
87
Context,
8+
commands::{tracing_handler_end, tracing_handler_start},
99
};
1010

1111
/// Responds with "pong"
@@ -53,7 +53,9 @@ pub async fn uptime(ctx: Context<'_>) -> anyhow::Result<()> {
5353
#[instrument(name = "help", skip(ctx))]
5454
pub async fn help(
5555
ctx: Context<'_>,
56-
#[description = "Specific command to show help about"] command: Option<String>,
56+
#[description = "Specific command to show help about"]
57+
#[autocomplete = "poise::builtins::autocomplete_command"]
58+
command: Option<String>,
5759
) -> anyhow::Result<()> {
5860
tracing_handler_start(&ctx).await;
5961
let config = Default::default();

src/commands/schedule.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
33
use std::num::NonZeroUsize;
44

5-
use poise::{serenity_prelude::CreateEmbed, CreateReply};
5+
use poise::{CreateReply, serenity_prelude::CreateEmbed};
66
use tracing::{info, instrument};
77

88
use crate::{
9+
Context,
910
commands::{call_to_parent_command, is_auth, tracing_handler_end, tracing_handler_start},
1011
model::schedule::{
1112
Objective, OutcomeCreateScheduledTask, ScheduledTaskId, ScheduledTasks, UnixTimestamp,
1213
},
13-
Context,
1414
};
1515

1616
#[poise::command(

src/commands/unranked_cmd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ use tracing::{info, instrument};
55

66
use self::{idea::idea, score::score};
77
use crate::{
8+
Context, Data,
89
commands::{
910
call_to_parent_command, is_auth, tracing_handler_end, tracing_handler_start,
1011
unranked_cmd::{
1112
idea::{display_ideas_channel, do_ideas_reset},
1213
score::{display_scores_channel, do_scores_reset},
1314
},
1415
},
15-
Context, Data,
1616
};
1717

1818
mod idea;

src/commands/unranked_cmd/idea.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@
33
use std::{fmt::Debug, num::NonZeroUsize};
44

55
use poise::{
6-
serenity_prelude::{CacheHttp, ChannelId, CreateEmbed, CreateMessage},
76
CreateReply,
7+
serenity_prelude::{CacheHttp, ChannelId, CreateEmbed, CreateMessage},
88
};
99
use tracing::{info, instrument};
1010

1111
use crate::{
12+
Data,
1213
commands::{
13-
call_to_parent_command, is_auth, tracing_handler_end, tracing_handler_start, Context,
14+
Context, call_to_parent_command, is_auth, tracing_handler_end, tracing_handler_start,
1415
},
1516
model::{
1617
unranked::ideas::{IdeaId, Ideas},
1718
user_serde::UserRecordSupport as _,
1819
},
19-
sanitize_markdown, Data,
20+
sanitize_markdown,
2021
};
2122

2223
#[poise::command(

src/commands/unranked_cmd/score.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
//! Groups the commands related to the scoring functionality for unranked
22
33
use crate::{
4+
Context, Data,
45
commands::{is_auth, tracing_handler_end, tracing_handler_start},
56
model::{
67
unranked::scores::{ScoreValue, Scores},
78
user_serde::UserRecordSupport as _,
89
},
9-
sanitize_markdown, Context, Data,
10+
sanitize_markdown,
1011
};
1112
use poise::{
12-
serenity_prelude::{CacheHttp, ChannelId, CreateEmbed, CreateMessage},
1313
CreateReply,
14+
serenity_prelude::{CacheHttp, ChannelId, CreateEmbed, CreateMessage},
1415
};
1516
use std::fmt::Debug;
1617
use tracing::{info, instrument};

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::{collections::HashSet, fmt::Debug, time::Instant};
22

33
use anyhow::Context as _;
44
use poise::serenity_prelude::{ChannelId, GuildId, RoleId, UserId};
5-
use shuttle_runtime::{tokio, SecretStore};
5+
use shuttle_runtime::{SecretStore, tokio};
66
use tracing::{error, info};
77

88
use crate::secrets::KeyName;

0 commit comments

Comments
 (0)