Skip to content

Commit

Permalink
feat: Cure on presence update
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 26, 2023
1 parent a8e9a9b commit 55a5ddf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage = "https://revanced.app"
license = "GPL-3.0"
name = "revanced-discord-bot"
repository = "https://github.com/revanced/revanced-discord-bot"
version = "2.5.2"
version = "2.6.2"
edition = "2021"

[profile.release]
Expand Down
3 changes: 2 additions & 1 deletion configuration.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
0
]
},
"logging_channel": 0
"logging_channel": 0,
"cure_on_presence_update": false
},
"administrators": {
"roles": [
Expand Down
3 changes: 2 additions & 1 deletion configuration.revanced.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
]
},
"media_channels": [],
"logging_channel": 1027892160797872179
"logging_channel": 1027892160797872179,
"cure_on_presence_update": true
},
"administrators": {
"roles": [
Expand Down
5 changes: 5 additions & 0 deletions src/events/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ mod guild_member_addition;
mod guild_member_update;
mod interaction;
mod message_create;
mod presence_update;
mod ready;

pub struct Handler<T> {
Expand Down Expand Up @@ -63,6 +64,10 @@ impl serenity::EventHandler for Handler<Arc<RwLock<Data>>> {
guild_member_addition::guild_member_addition(&ctx, &mut new_member).await;
}

async fn presence_update(&self, ctx: serenity::Context, new_data: Presence) {
presence_update::presence_update(&ctx, &new_data).await;
}

async fn guild_member_update(
&self,
ctx: serenity::Context,
Expand Down

0 comments on commit 55a5ddf

Please sign in to comment.