Compare commits

..

2 Commits

Author SHA1 Message Date
5100f7462d Log successful Telegram connection 2025-09-19 23:02:37 +03:00
c0f834780d Shameful commas fix in db base 2025-09-19 23:01:57 +03:00
2 changed files with 4 additions and 2 deletions

View File

@ -23,6 +23,8 @@ public partial class JetHeraldBot
Client = new TelegramBotClient(TelegramConfig.ApiKey); Client = new TelegramBotClient(TelegramConfig.ApiKey);
Me = await Client.GetMeAsync(); Me = await Client.GetMeAsync();
Log.LogInformation("Connected to Telegram as {username}, id:{id})", Me.Username, Me.Id);
Commands = new ChatCommandRouter(Me.Username, Log); Commands = new ChatCommandRouter(Me.Username, Log);
Commands.Add(new SubscribeCommand(Db, Client), "subscribe", "sub"); Commands.Add(new SubscribeCommand(Db, Client), "subscribe", "sub");
Commands.Add(new UnsubscribeCommand(Db, Client), "unsubscribe", "unsub"); Commands.Add(new UnsubscribeCommand(Db, Client), "unsubscribe", "unsub");

View File

@ -54,8 +54,8 @@ CREATE TABLE `heartevent` (
`Event` varchar(16) NOT NULL COMMENT 'ENUM(''created'',''started'',''stopped'',''deleted'')', `Event` varchar(16) NOT NULL COMMENT 'ENUM(''created'',''started'',''stopped'',''deleted'')',
`CreateTs` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `CreateTs` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`HeartEventId`), PRIMARY KEY (`HeartEventId`),
KEY `idx_heartevent_TopicId` (`TopicId`,`HeartEventId`) KEY `idx_heartevent_TopicId` (`TopicId`,`HeartEventId`),
KEY `idx_heartevent_Status` (`Status`), KEY `idx_heartevent_Status` (`Status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;