Skip to content

Commit dae88a1

Browse files
authored
ClueItemBroadcasts and CollectionLog thresholds (#60)
* Added Clue Item extractor and tests * Added clue item broadcast handler * Added Clue Item Broadcasts to the threshold and custom filter commands * Code formatting cleanup * Added to broadcast toggle * Combined ClueItem, RaidDrop and CollectionLog broadcasts into using the same custom filter list and drop_price_threshold * Added broadcast threshold customization for Collection Logs by using the completion percentages at https://oldschool.runescape.wiki/w/Collection_log/Table
1 parent dd6446a commit dae88a1

File tree

15 files changed

+744
-50
lines changed

15 files changed

+744
-50
lines changed

Cargo.lock

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

trackscape-discord-api/src/controllers/chat_controller.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use trackscape_discord_shared::osrs_broadcast_extractor::osrs_broadcast_extracto
1919
use trackscape_discord_shared::osrs_broadcast_handler::OSRSBroadcastHandler;
2020
use trackscape_discord_shared::redis_helpers::{fetch_redis, write_to_cache_with_seconds};
2121
use trackscape_discord_shared::wiki_api::wiki_api::get_quests_and_difficulties;
22+
use trackscape_discord_shared::wiki_api::wiki_api::get_clogs_and_percentages;
2223
use web::Json;
2324

2425
#[derive(Debug)]
@@ -236,6 +237,8 @@ async fn new_clan_chats(
236237

237238
let quests_from_redis = get_quests_and_difficulties(&mut redis_connection).await;
238239

240+
let clogs_from_redis = get_clogs_and_percentages(&mut redis_connection).await;
241+
239242
let cloned_celery = Arc::clone(&**celery);
240243
let celery_job_queue = Arc::new(CeleryJobQueue {
241244
celery: cloned_celery,
@@ -245,6 +248,7 @@ async fn new_clan_chats(
245248
chat.clone(),
246249
item_mapping_from_redis,
247250
quests_from_redis,
251+
clogs_from_redis,
248252
registered_guild.clone(),
249253
league_world,
250254
mongodb.drop_logs.clone(),

0 commit comments

Comments
 (0)