feat: Cure on presence update

This commit is contained in:
oSumAtrIX 2023-10-26 17:48:23 +02:00
parent a8e9a9bb49
commit 55a5ddfe5e
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
5 changed files with 11 additions and 4 deletions

2
Cargo.lock generated
View File

@ -1453,7 +1453,7 @@ dependencies = [
[[package]]
name = "revanced-discord-bot"
version = "2.5.2"
version = "2.6.2"
dependencies = [
"base64 0.21.5",
"bson",

View File

@ -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]

View File

@ -7,7 +7,8 @@
0
]
},
"logging_channel": 0
"logging_channel": 0,
"cure_on_presence_update": false
},
"administrators": {
"roles": [

View File

@ -9,7 +9,8 @@
]
},
"media_channels": [],
"logging_channel": 1027892160797872179
"logging_channel": 1027892160797872179,
"cure_on_presence_update": true
},
"administrators": {
"roles": [

View File

@ -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> {
@ -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,