diff --git a/Cargo.lock b/Cargo.lock index 525f706..cc96303 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1453,7 +1453,7 @@ dependencies = [ [[package]] name = "revanced-discord-bot" -version = "2.5.2" +version = "2.6.2" dependencies = [ "base64 0.21.5", "bson", diff --git a/Cargo.toml b/Cargo.toml index c5d3e09..a8ee3e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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] diff --git a/configuration.example.json b/configuration.example.json index d910f34..741fb48 100644 --- a/configuration.example.json +++ b/configuration.example.json @@ -7,7 +7,8 @@ 0 ] }, - "logging_channel": 0 + "logging_channel": 0, + "cure_on_presence_update": false }, "administrators": { "roles": [ diff --git a/configuration.revanced.json b/configuration.revanced.json index 407919b..184fdde 100644 --- a/configuration.revanced.json +++ b/configuration.revanced.json @@ -9,7 +9,8 @@ ] }, "media_channels": [], - "logging_channel": 1027892160797872179 + "logging_channel": 1027892160797872179, + "cure_on_presence_update": true }, "administrators": { "roles": [ diff --git a/src/events/mod.rs b/src/events/mod.rs index 1d06ea3..dc9e1d3 100644 --- a/src/events/mod.rs +++ b/src/events/mod.rs @@ -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 { @@ -63,6 +64,10 @@ impl serenity::EventHandler for Handler>> { 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,