summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.default.json1
-rw-r--r--src/Config.zig1
-rw-r--r--src/main.zig2
3 files changed, 3 insertions, 1 deletions
diff --git a/config.default.json b/config.default.json
index c17bf09..56840c1 100644
--- a/config.default.json
+++ b/config.default.json
@@ -1,6 +1,7 @@
1{ 1{
2 "_": "Copy this file to `config.json` and modify it there", 2 "_": "Copy this file to `config.json` and modify it there",
3 3
4 "bot_name": "Ukko's Bot",
4 "bot_token": "123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi", 5 "bot_token": "123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi",
5 "db_path": "./data.db", 6 "db_path": "./data.db",
6 "dev_group": -1001234567890, 7 "dev_group": -1001234567890,
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) {