chore: update bot framework

This commit updates the crate poise to its latest version
This commit is contained in:
2024-01-18 20:47:37 +01:00
parent d17252b338
commit 844940da00
7 changed files with 309 additions and 209 deletions
+6 -6
View File
@@ -43,7 +43,7 @@ impl Database {
&self,
guild_id: GuildId,
) -> Result<Vec<ChannelId>> {
let guild_id = guild_id.0 as i64;
let guild_id = guild_id.get() as i64;
sqlx::query!(
r#"
SELECT channel_id
@@ -62,7 +62,7 @@ WHERE guild_id = ?1"#,
.map(|channels| {
channels
.iter()
.map(|id| ChannelId(id.channel_id as u64))
.map(|id| ChannelId::new(id.channel_id as u64))
.collect()
})
}
@@ -80,8 +80,8 @@ WHERE guild_id = ?1"#,
guild_id: GuildId,
channel_id: ChannelId,
) -> Result<()> {
let guild_id = guild_id.0 as i64;
let channel_id = channel_id.0 as i64;
let guild_id = guild_id.get() as i64;
let channel_id = channel_id.get() as i64;
let mut conn = self.0.acquire().await?;
sqlx::query!(r#"
@@ -112,8 +112,8 @@ VALUES ( ?1, ?2 )"#,
guild: GuildId,
channel: ChannelId,
) -> Result<()> {
let guild_id = guild.0 as i64;
let channel_id = channel.0 as i64;
let guild_id = guild.get() as i64;
let channel_id = channel.get() as i64;
let mut conn = self.0.acquire().await?;
sqlx::query!(r#"
DELETE FROM guild_log_channels