From a9eeef17d70049690138eaca84f7b93b49311c79 Mon Sep 17 00:00:00 2001 From: starnakin Date: Wed, 11 Oct 2023 12:12:40 +0000 Subject: [PATCH] fix: don't remove message on check mark on all channel --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index abc8cbb..be42941 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -43,6 +43,12 @@ int main() bot.on_message_reaction_add([&bot](const dpp::message_reaction_add_t& event) { + dpp::channel channel = bot.channel_get_sync(event.channel_id); + dpp::channel category = bot.channel_get_sync(channel.parent_id); + + if (category.is_category() == false || category.name != GROCERY_LIST_CATEGORY) + return; + if (event.reacting_user.id == bot.me.id) return; dpp::emoji emoji = event.reacting_emoji;