|
| 1 | +## Commands |
| 2 | + |
| 3 | +### Subscribe a channel, 1-1 chat, private group, or public group to a web feed |
| 4 | + |
| 5 | +__Any chat but a channel__: |
| 6 | + |
| 7 | +_The user issuing the command must have administrative rights in the chat._ |
| 8 | + |
| 9 | +``` |
| 10 | +command | argument |
| 11 | +---------+--------------------------------------------- |
| 12 | +/sub | <list of comma-separated full url addresses> |
| 13 | +---------+--------------------------------------------- |
| 14 | +example | /sub https://www.reddit.com/r/pop_os.rss |
| 15 | +---------+--------------------------------------------- |
| 16 | +response | error or success message |
| 17 | +---------+--------------------------------------------- |
| 18 | +``` |
| 19 | + |
| 20 | +__Channel__: |
| 21 | + |
| 22 | +_Both the user performing this command and the bot must be admin in the target channel. The command may be issued from any chat with the bot. For a better experience it is recommended to give bot the permission to edit and pin messages._ |
| 23 | + |
| 24 | +``` |
| 25 | +command | argument |
| 26 | +---------+------------------------------------------------------- |
| 27 | +/subchan | <chat_id> |
| 28 | +---------+------------------------------------------------------- |
| 29 | +example | /subchan -25154554 https://www.reddit.com/r/pop_os.rss |
| 30 | +---------+------------------------------------------------------- |
| 31 | +response | error or success message |
| 32 | +---------+------------------------------------------------------- |
| 33 | +``` |
| 34 | + |
| 35 | +### View or edit a chat's or channel's settings |
| 36 | + |
| 37 | +Available values: |
| 38 | + |
| 39 | +- `blacklist: term, term, ...` |
| 40 | + - excludes feed items where a term is found in either their url or description |
| 41 | + - example: `blacklist: itsmycode, butIamproudofit` |
| 42 | +- `batch_at: HHMM, HHMM, ...` |
| 43 | + - incompatible with "batch_every" |
| 44 | + - batch all updates and post them at the given times |
| 45 | + - example: `batch_at: 0800, 1200, 1800` |
| 46 | +- `batch_every: n` |
| 47 | + - incompatible with "batch_at" |
| 48 | + - batch all updates and post them every n seconds |
| 49 | + - example: `batch_every: 9000` (= 20 minutes) |
| 50 | +- `paused: "true" or "false"` |
| 51 | + - suspend all notifications to the chat |
| 52 | +- `webview: "true" or "false"` |
| 53 | + - allow Telegram to display the last shown items in webview mode |
| 54 | +- `pin: "true" or "false"`, |
| 55 | + - have the bot try to pin every batch message |
| 56 | +- `clean_behind: "true" or "false"` |
| 57 | + - have the bot try to delete their own messages |
| 58 | + - does not apply to batch messages |
| 59 | + |
| 60 | +_The user issuing the command must have administrative rights in the chat._ |
| 61 | + |
| 62 | +__Any chat but a channel__: |
| 63 | + |
| 64 | +``` |
| 65 | +command | argument |
| 66 | +---------+------------------------------------------ |
| 67 | +/set | optional argument after line break |
| 68 | + | <":"-separated key-value pairs> |
| 69 | +---------+------------------------------------------ |
| 70 | +example | /set |
| 71 | + | batch_size: 10 |
| 72 | + | batch_at: 0800, 1200 |
| 73 | + | webview: true > |
| 74 | +---------+------------------------------------------ |
| 75 | +response | with no argument: list of settings |
| 76 | + | with argument: error or success message |
| 77 | +---------+------------------------------------------ |
| 78 | +``` |
| 79 | +__Channels__: |
| 80 | + |
| 81 | +_Both the user performing this command and the bot must be admin in the target channel. The command may be issued from any chat with the bot. For a better experience it is recommended to give bot the permission to edit and pin messages._ |
| 82 | + |
| 83 | +``` |
| 84 | +command | argument |
| 85 | +---------+--------------------------------------------- |
| 86 | +/setchan | <line break + ":"-separated key-value pairs |
| 87 | +---------+--------------+------------------------------ |
| 88 | +example | /setchan -25154554 |
| 89 | + | batch_every: 9000 |
| 90 | + | pin: true |
| 91 | + | webview: true |
| 92 | +---------+--------------------------------------------- |
| 93 | +returns | error or success message |
| 94 | +---------+--------------------------------------------- |
| 95 | +``` |
| 96 | + |
| 97 | +### List subscribed to web feeds |
| 98 | + |
| 99 | +__Any chat but a channel__: |
| 100 | + |
| 101 | +``` |
| 102 | +command | argument |
| 103 | +----------+--------- |
| 104 | +/list, /l | none |
| 105 | +----------+--------- |
| 106 | +example | /l |
| 107 | +----------+----------------------------- |
| 108 | +response | list of #s associated with |
| 109 | + | each subscripbed to web feed |
| 110 | +---------------------------------------- |
| 111 | +``` |
| 112 | + |
| 113 | +__Channels__: |
| 114 | + |
| 115 | +``` |
| 116 | +command | argument |
| 117 | +----------+--------------------------------- |
| 118 | +/listchan, /lchan | <chat_id of the channel> |
| 119 | +----------+--------------------------------- |
| 120 | +example | /lchan -25154554 |
| 121 | +----------+--------------------------------- |
| 122 | +response | list of #s associated with |
| 123 | + | each subscripbed to web feed |
| 124 | +-------------------------------------------- |
| 125 | +``` |
| 126 | + |
| 127 | +### Show information about a subscribed to feed |
| 128 | + |
| 129 | +``` |
| 130 | +command | argument |
| 131 | +-------------+------------------------------------------------ |
| 132 | +/feed, /f | <# of the target feed, or full url > |
| 133 | +-------------+------------------------------------------------ |
| 134 | +example | /feed 1, /feed https://www.phoronix.com/rss.php |
| 135 | +-------------+------------------------------------------------ |
| 136 | +response | information about the target feed |
| 137 | +-------------+------------------------------------------------ |
| 138 | +``` |
| 139 | +### Fetching fresh items |
| 140 | + |
| 141 | +``` |
| 142 | +command | argument |
| 143 | +---------+---------------------------------------------------------- |
| 144 | +/fresh | <# of days representing how old the items can be at most |
| 145 | +---------+---------------------------------------------------------- |
| 146 | +example | /fresh 1 |
| 147 | +---------+---------------------------------------------------------- |
| 148 | +response | all at most #-old items collected from |
| 149 | + | all feeds the chat is subscribed to |
| 150 | +-------------------------------------------------------------------- |
| 151 | +``` |
| 152 | + |
| 153 | +### Displaying items from a single feed |
| 154 | + |
| 155 | +``` |
| 156 | +command | argument |
| 157 | +------------+-------------------------------------------- |
| 158 | +/items, /i | <# or full url of the target of days |
| 159 | + | representing the max "age" of the items |
| 160 | +------------+-------------------------------------------- |
| 161 | +example | /items 1 |
| 162 | + | /i https://www.phoronix.com/rss.php |
| 163 | +------------+--------------------------------------------- |
| 164 | +response | all the items available from the target feed |
| 165 | +---------------------------------------------------------- |
| 166 | +``` |
| 167 | +### Miscellaneous |
| 168 | + |
| 169 | +- /pause, /p: Suspend notification to the chat |
| 170 | +- /pausechan `<chat_id>`: Like the previous one but for channels |
| 171 | +- /resume: Whether the bot is allowed to send notification messages to the chat. |
| 172 | +- /resumechan `<chat_id>`: like the previous one but for channels |
| 173 | +- /purge (chat admins only): Make the database forget entirely about the chat |
| 174 | +- /purgechan `<chat_id>` (chat admins only): Make the database forget entirely about the channel |
| 175 | +- /reset (chat admins only): Set the chat's settings to the defaults |
| 176 | +- /resetchan `<chat_id>` (chat admins only) `<channel_id>`: Set the channels's settings to the defaults |
| 177 | +- /search, /se `<space-separated keywords>`: Search for keywords in all items in all feeds the current chat is subscribed to. |
| 178 | + - example: `/se cheap cloud host` |
| 179 | +- /unsub (chat admins only) `<list of 1-space-separated #s or full url addresses>` |
| 180 | + - unsubscribe from all the feeds passed as argument, if indeed they exits |
| 181 | + - examples: `/u 1 2 3`, `/unsub https://www.compositional.fm/rss https://www.blabla.org/feed` |
| 182 | +- /unsubchan `<chat_id>` (chat admins only) `<channel id> + <list of 1-space-separated # or full urls>`: like the previous one but for channels |
0 commit comments