summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2025-08-16 15:21:49 +0300
committerGravatar Uko Kokņevičs2025-08-16 15:21:49 +0300
commit6e2ce2e988c0f46950515488c790e97f430fbf33 (patch)
treeebe8fe062ff914d15e8ac342566868d8207b2ceb /src
parentFix ChatBoostSource (diff)
downloadukkobot-main.tar.gz
ukkobot-main.tar.xz
ukkobot-main.zip
Make bot name configurableHEADmain
Diffstat (limited to 'src')
-rw-r--r--src/Config.zig1
-rw-r--r--src/main.zig2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Config.zig b/src/Config.zig
index 2732df3..60f25ad 100644
--- a/src/Config.zig
+++ b/src/Config.zig
@@ -40,6 +40,7 @@ pub const Wrapper = struct {
40 } 40 }
41}; 41};
42 42
43bot_name: []const u8,
43bot_token: []const u8, 44bot_token: []const u8,
44db_path: [:0]const u8, 45db_path: [:0]const u8,
45dev_group: i64, 46dev_group: i64,
diff --git a/src/main.zig b/src/main.zig
index 5931250..96f98d9 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -79,7 +79,7 @@ fn wrappedMain(bot: *Bot) !void {
79 .text = "Initializing...", 79 .text = "Initializing...",
80 }); 80 });
81 81
82 try bot.setMyName(.{ .name = "Ukko's bot" }); 82 try bot.setMyName(.{ .name = bot.config.bot_name });
83 83
84 var gup = types.GetUpdatesParams{ .timeout = 60 }; 84 var gup = types.GetUpdatesParams{ .timeout = 60 };
85 while (bot.poweron) { 85 while (bot.poweron) {