From c2b77f1586851cdc472910ff42a38b90c23afa9a Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 5 Dec 2025 23:19:57 +0500 Subject: fix: invalid argument when badge isn't just a number --- bot/src/irc/message.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot') diff --git a/bot/src/irc/message.hpp b/bot/src/irc/message.hpp index f8ce995..d0882fb 100644 --- a/bot/src/irc/message.hpp +++ b/bot/src/irc/message.hpp @@ -27,7 +27,7 @@ namespace bot { std::string display_name; int id; - std::map badges; + std::map badges; // More fields will be here }; @@ -59,7 +59,7 @@ namespace bot { for (const std::string &badge : utils::string::split_text(msg.tags.at("badges"), ',')) { auto b = utils::string::split_text_n(badge, "/", 1); - sender.badges.insert_or_assign(b[0], std::stoi(b[1])); + sender.badges.insert_or_assign(b[0], b[1]); } source.login = msg.params.front(); -- cgit v1.2.3