mirror of
https://github.com/Jetsparrow/jetherald.git
synced 2026-01-20 23:56:08 +03:00
Compare commits
2 Commits
3cc7dfa233
...
5100f7462d
| Author | SHA1 | Date | |
|---|---|---|---|
| 5100f7462d | |||
| c0f834780d |
@ -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");
|
||||||
|
|||||||
@ -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 */;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user