chore: update to latest shuttle

This commit is contained in:
Suiranoil
2024-01-25 16:20:23 +03:00
parent c17c83982f
commit b9769bc972
6 changed files with 1405 additions and 579 deletions

1944
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,4 +8,4 @@ name = "entity"
path = "src/lib.rs"
[dependencies]
sea-orm = "0.11.3"
sea-orm = "0.12.12"

View File

@@ -1,3 +1,5 @@
use std::fmt::Display;
use sea_orm::entity::prelude::*;
#[derive(Debug, Clone, PartialEq, Eq, Hash, Copy, EnumIter, DeriveActiveEnum)]
@@ -33,3 +35,14 @@ impl From<&Role> for i32 {
}
}
}
impl Display for Role {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Role::Tank => f.write_str("tank")?,
Role::Dps => f.write_str("dps")?,
Role::Support => f.write_str("support")?,
};
Ok(())
}
}

View File

@@ -12,7 +12,7 @@ path = "src/lib.rs"
async-std = { version = "1", features = ["attributes", "tokio1"] }
[dependencies.sea-orm-migration]
version = "0.11.3"
version = "0.12.12"
features = [
"runtime-tokio-rustls",
"sqlx-postgres",

View File

@@ -9,14 +9,14 @@ entity = { path = "../entity" }
tokio = { version = "1.29.1", features = ["full"] }
tracing = "0.1.37"
serenity = {version = "0.11.6", default-features = false, features = ["rustls_backend", "client", "gateway", "model", "cache", "collector", "utils"] }
sqlx = { version = "0.6.3", features = ["runtime-tokio-rustls", "postgres"] }
sea-orm = { version = "0.11.3", features = ["sqlx-postgres", "runtime-tokio-rustls", "macros"] }
itertools = "0.11.0"
shuttle-secrets = "0.20.0"
shuttle-serenity = "0.20.0"
shuttle-runtime = "0.20.0"
shuttle-shared-db = { version = "0.20.0", features = ["postgres-rustls"] }
serenity = {version = "0.11.7", default-features = false, features = ["rustls_backend", "client", "gateway", "model", "cache", "collector", "utils"] }
sqlx = { version = "0.7.3", features = ["runtime-tokio-rustls", "postgres"] }
sea-orm = { version = "0.12.12", features = ["sqlx-postgres", "runtime-tokio-rustls", "macros"] }
itertools = "0.12.0"
shuttle-secrets = "0.37.0"
shuttle-serenity = { version = "0.37.0", default-features = false, features = ["serenity-0-11-rustls_backend"] }
shuttle-runtime = "0.37.0"
shuttle-shared-db = { version = "0.37.0", features = ["postgres", "sqlx"] }
rusttype = "0.9.3"
image = "0.24.6"

View File

@@ -11,7 +11,6 @@ use rusttype::Font;
use serenity::model::prelude::UserId;
use serenity::prelude::{GatewayIntents, TypeMapKey};
use serenity::Client;
use shuttle_runtime::Context;
use shuttle_secrets::SecretStore;
use sqlx::PgPool;
use std::sync::Arc;
@@ -41,10 +40,10 @@ async fn serenity(
) -> shuttle_serenity::ShuttleSerenity {
let token = secret_store
.get("DISCORD_TOKEN")
.context("'DISCORD_TOKEN' was not found")?;
.expect("'DISCORD_TOKEN' was not found");
let app_id = secret_store
.get("DISCORD_APP_ID")
.context("'DISCORD_APP_ID' was not found")?;
.expect("'DISCORD_APP_ID' was not found");
let mut bot = MixerBot::new();
@@ -73,7 +72,7 @@ async fn serenity(
let creator = UserId::from(
secret_store
.get("CREATOR_ID")
.context("'CREATOR_ID' was not found")?
.expect("'CREATOR_ID' was not found")
.parse::<u64>()
.unwrap(),
);