File tree 1 file changed +48
-0
lines changed
1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ Deploying
2
+ ---------
3
+
4
+ ### Create A Bot
5
+ Contact @BotFather to create a new bot, he will also create a token for accessing the bot.
6
+
7
+ ### Find the ZeroMQ Interface Address
8
+ The address is placed in the configuration file of p-vector (or other compatible software)
9
+ It looks like ` tcp://repo.aosc.io:xxxxx ` .
10
+
11
+ ### Launch the Bot
12
+ Install requirements:
13
+ ```
14
+ pip3 install --user pyzmq aiogram
15
+ ```
16
+
17
+ Start the bot:
18
+ ```
19
+ TELEGRAM_TOKEN=12345:aB_cdEf_gfoobar python3 telegram.py tcp://repo.aosc.io:xxxxx
20
+ ```
21
+
22
+ ### Set the Chat IDs to Notify
23
+ 1 . Add the bot in your channels or groups (referred to as "chats" in Bot API terms).
24
+ 2 . Send a /start@... (bot's username) message.
25
+ 3 . Check the "chat_ids.lst" in current working directory, you will found the id of the chat.
26
+ 4 . Copy-and-paste the id to "notify_chat_ids.lst" file. If there is not, create one.
27
+
28
+ >> IDs of users are positive numbers, IDs of channels and groups are negative numbers.
29
+
30
+ Ctrl+C to stop the bot and restart it to apply the configuration.
31
+
32
+ ### Additional Information
33
+
34
+ These debugging commands may be useful.
35
+
36
+ - ` /start `
37
+ - ` /stop `
38
+ - ` /ping `
39
+
40
+ The general method to get the chat ID (instead of looking for "chat_ids.lst") is as follows:
41
+
42
+ 1 . Browse the URL https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
43
+ and you will see events the bot recently received.
44
+ 2 . Send some messages to the bot, refresh the "getUpdates" page mentioned
45
+ at previous step, check if there is a new event.
46
+ 3 . Now you may add the bot to your chats and after refreshing the "getUpdates"
47
+ you will see the IDs.
48
+
You can’t perform that action at this time.
0 commit comments