summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-05-02 00:13:10 +0500
committerilotterytea <iltsu@alright.party>2024-05-02 00:13:10 +0500
commit5776100b8a2f5fe568fbd19f8117bfce2cd63a5b (patch)
tree238968e7ccabe42b93170404195f1a082ba43cd3 /src
parent0e20d75f3dcd12cc0c66c321684eadbed1513a9f (diff)
feat: added HelixClient into InstanceBundle
Diffstat (limited to 'src')
-rw-r--r--src/bundle.hpp2
-rw-r--r--src/main.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/bundle.hpp b/src/bundle.hpp
index e45137d..1ea47a3 100644
--- a/src/bundle.hpp
+++ b/src/bundle.hpp
@@ -1,11 +1,13 @@
#pragma once
+#include "api/twitch/helix_client.hpp"
#include "irc/client.hpp"
#include "localization/localization.hpp"
namespace bot {
struct InstanceBundle {
irc::Client &irc_client;
+ const api::twitch::HelixClient &helix_client;
const bot::loc::Localization &localization;
};
}
diff --git a/src/main.cpp b/src/main.cpp
index 842e093..ff3e78b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -62,9 +62,9 @@ int main(int argc, char *argv[]) {
cfg.bot_client_id);
client.on<bot::irc::MessageType::Privmsg>(
- [&client, &command_loader, &localization,
- &cfg](const bot::irc::Message<bot::irc::MessageType::Privmsg> &message) {
- bot::InstanceBundle bundle{client, localization};
+ [&client, &command_loader, &localization, &cfg, &helix_client](
+ const bot::irc::Message<bot::irc::MessageType::Privmsg> &message) {
+ bot::InstanceBundle bundle{client, helix_client, localization};
pqxx::connection conn(GET_DATABASE_CONNECTION_URL(cfg));