From b629b237da6c7618ae7e679a2c9b879c6019662d Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Sun, 23 Apr 2023 15:04:34 -0400 Subject: sql: Implement bot state Allows for persistent, dynamic storage of configuration options outside of the config.json file. The bot_state table is, essentially, a key-value store for config options. There are two new prepared statements, `state` and `update_state`: - `state` will return the value for the provided key - `update_state` will create the key or update an existing key --- include/142bot/bot.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/142bot/bot.hpp b/include/142bot/bot.hpp index 342f32e..1fdb042 100644 --- a/include/142bot/bot.hpp +++ b/include/142bot/bot.hpp @@ -14,6 +14,7 @@ class Bot { dpp::snowflake owner_id; private: bool run_database_migrations(); + void create_queries(); public: char prefix; pqxx::connection conn; -- cgit v1.2.3