You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-13Lines changed: 29 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,16 +29,32 @@ On a bot side we can implement any business logic we want.
29
29
2. Save your Bot Token
30
30
31
31
## Starting a sample project
32
-
1. In Visual Studio you should enable multi-project startup: https://learn.microsoft.com/en-us/visualstudio/ide/how-to-set-multiple-startup-projects?view=vs-2022
33
-
34
-
2. In our case, we need to run 2 project simultaneously: Botticelli.Server and Samples\TelegramBotSample
35
-
3. After the first run of a bot-project(Samples\TelegramBotSample in pour case), you should find Data\botId file with a generanted botId
36
-
4. Copy a generated botId into a clipboard
37
-
5. In your browser run http://localhost:5050/swagger (Admin panel functions)
38
-
6. Find an AddNewBot([FromBody] RegisterBotRequest request) method with parameters:
39
-
- botId (put your botId here)
40
-
- botKey (put your Telegram Bot key from a BotFather)
41
-
- botType (0 - Telegram)
42
-
7. Execute AddNewBot with your parameters
43
-
8. Create some new chat/group with your bot (Notice! In order to read messages from a group, your bot account needs admin priveleges!)
44
-
9. Enjoy!
32
+
1. Go to a folder and edit appsettings.json this way:
33
+
`
34
+
{
35
+
"Logging": {
36
+
"LogLevel": {
37
+
"Default": "Information",
38
+
"Microsoft.AspNetCore": "Warning"
39
+
}
40
+
},
41
+
"SampleSettings": {
42
+
"SecureStorageConnectionString": "Filename=../../../database.db;Password=123;ReadOnly=true" // path to a secure storage db, you may you own
43
+
},
44
+
"ServerSettings": {
45
+
"ServerUri": "http://localhost:5050" // path to an admin server, your may configure it (don't forget to check your server settings)
46
+
},
47
+
"AllowedHosts": "*"
48
+
}
49
+
50
+
`
51
+
2. Start a sample bot project at Samples\TelegramMessagingSample. Run run_standalone.sh.
52
+
3. After the first run of a bot-project(Samples\TelegramMessagingSample in pour case), you should find Data\botId file with a generated botId
53
+
4. Copy a generated *botId* into a clipboard
54
+
5. In your browser run https://localhost:7247 (Admin panel).
0 commit comments