Skip to content

Commit

Permalink
remove old_ from mapnames
Browse files Browse the repository at this point in the history
  • Loading branch information
zefanjajobse committed Oct 8, 2023
1 parent 1d364a6 commit e2b56fb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 91 deletions.
106 changes: 20 additions & 86 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ serde_json = { version = "1.0" }
serde = { version = "1.0", features = ["derive"] }
chrono = "0.4"
warp = "0.3"
flexi_logger = "0.25"
flexi_logger = "0.27"
log = "0.4"
imageproc = "0.23"
confy = "0.5"
Expand All @@ -32,4 +32,4 @@ features = ["client", "gateway", "rustls_backend", "model", "cache"]
[dependencies.reqwest]
version = "0.11"
default-features = false
features = ["rustls-tls", "json"]
features = ["rustls-tls", "json"]
10 changes: 7 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,12 @@ async fn status(ctx: Context, statics: Static) -> Result<()> {
Ok(status) => {
for server in status {
if server.name == statics.server_name {
let server_info =
format!("{}/{} - {}", server.players, server.max_players, server.map);
let server_info = format!(
"{}/{} - {}",
server.players,
server.max_players,
server.map.replace("Old_", "")
);
// change game activity
ctx.set_activity(Activity::playing(server_info)).await;

Expand Down Expand Up @@ -181,7 +185,7 @@ pub async fn gen_img(server: BattlebitServer) -> Result<String> {
let img = client
.get(format!(
"https://cdn.gametools.network/maps/battlebit/{}.jpg",
server.map
server.map.replace("Old_", "")
))
.send()
.await?
Expand Down

0 comments on commit e2b56fb

Please sign in to comment.