diff options
| author | 2025-07-22 08:46:30 +0300 | |
|---|---|---|
| committer | 2025-07-22 08:46:30 +0300 | |
| commit | 6fb8f6db42edd92d6d7e06c4a5a6613ec06fb8a8 (patch) | |
| tree | bde05834831cc2c88c70a40705d56bd2cd2d4c9a | |
| parent | Whitelist allowed inline bots (diff) | |
| download | ukkobot-6fb8f6db42edd92d6d7e06c4a5a6613ec06fb8a8.tar.gz ukkobot-6fb8f6db42edd92d6d7e06c4a5a6613ec06fb8a8.tar.xz ukkobot-6fb8f6db42edd92d6d7e06c4a5a6613ec06fb8a8.zip | |
Add some extra logging
| -rw-r--r-- | src/main.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index 9e1de47..d15b2b2 100644 --- a/src/main.zig +++ b/src/main.zig | |||
| @@ -138,7 +138,9 @@ fn isAllowedInlineBot(id: i64) bool { | |||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | fn onMessage(bot: *Bot, msg: types.Message) !void { | 140 | fn onMessage(bot: *Bot, msg: types.Message) !void { |
| 141 | std.log.debug("Got a message {}", .{msg}); | ||
| 141 | if (msg.via_bot) |via| { | 142 | if (msg.via_bot) |via| { |
| 143 | std.log.debug("Has a via bot: {}", .{via}); | ||
| 142 | if (!isAllowedInlineBot(via.id)) { | 144 | if (!isAllowedInlineBot(via.id)) { |
| 143 | std.log.info("Deleting an unallowed inline bot message from {?s} {}", .{ via.username, via.id }); | 145 | std.log.info("Deleting an unallowed inline bot message from {?s} {}", .{ via.username, via.id }); |
| 144 | try bot.deleteMessage(.{ | 146 | try bot.deleteMessage(.{ |