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
+22-26Lines changed: 22 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,22 +65,22 @@ required for the bot to function. Finally, you must ensure that you have
65
65
subscribed the bot users to the list of events it will need to receive in order
66
66
to operate.
67
67
68
-
1) First, navigate to `api.slack.com/apps` and create a new slack app. Give it
68
+
1. First, navigate to `api.slack.com/apps` and create a new slack app. Give it
69
69
a name and select the workspace that it will serve, and then click create.
70
70
71
-
2) Enable socket mode by clicking on the menu of the same name and then
71
+
2. Enable socket mode by clicking on the menu of the same name and then
72
72
clicking on the toggle labelled "Enable Socket Mode". You'll be prompted to
73
73
create an App Level Token which you must do next.
74
74
75
-
2) App Level Token
75
+
3. App Level Token
76
76
77
77
This token is used by the bot to access the websocket event feed in version 3
78
78
of the Slack API. The toggle you enabled in the previous step, "Enable Socket
79
79
Mode", is what turns on the event feed. Assuming you've not already created an
80
80
App Level Token you'll now be prompted to do so. Place it into the config file
81
81
under the entry `app_key`.
82
82
83
-
3) Bot User Token
83
+
4. Bot User Token
84
84
85
85
This token is used by the bot to interact with the workspace and users via
86
86
Slack's conversations API. In order to create this token you must first
@@ -101,7 +101,6 @@ chat:write
101
101
chat:write.customize
102
102
chat:write.public
103
103
dnd:read
104
-
emoji:read
105
104
groups:history
106
105
groups:read
107
106
groups:write
@@ -113,8 +112,6 @@ links:write
113
112
mpim:history
114
113
mpim:read
115
114
mpim:write
116
-
pins:read
117
-
pins:write
118
115
reactions:read
119
116
reactions:write
120
117
reminders:list
@@ -131,7 +128,7 @@ Access Token" (begins with `xoxb`) into the config file under the entry
131
128
display name using the menu on the left labelled "Basic Information", if you
132
129
want.
133
130
134
-
4) Event subscription
131
+
5. Event subscription
135
132
136
133
NOTE: Make sure you toggle "Enable Socket" (step 2) before attempting this!
137
134
@@ -146,48 +143,47 @@ fine to select all of the event subscriptions here if you want to be on the simp
146
143
```
147
144
app_mention
148
145
app_mentions:read
146
+
channels:history
149
147
emoji_changed
150
148
emoji:read
149
+
groups:history
150
+
im:history
151
151
link_shared
152
152
links:read
153
153
message.channels
154
-
channels:history
155
-
message.groups
156
-
groups:history
157
154
message.im
158
-
im:history
155
+
message.groups
159
156
message.mpim
160
157
mpim:history
161
158
reaction_added
162
159
reactions:read
163
160
reaction_removed
164
-
reactions:read
165
161
```
166
162
167
163
168
164
## Installation
169
165
170
-
1. Copy `config/config.json.template` to `config/config.json`
171
-
2. Fill the APP and API token names in the config.json file.
172
-
3. Add your user id (slack id, not the username) to `admin_users` group in `config/config.json`
166
+
1. Copy _config/config.json.template_ to _config/config.json_
167
+
2. Fill the APP and API token names in the _config.json_ file.
168
+
3. Add your user id (slack id, not the username) to `admin_users` group in _config/config.json_
173
169
4. If you want to use the wolfram alpha api, register a valid app id on http://products.wolframalpha.com/api/ and set `wolfram_app_id` in `config/config.json`
174
-
5. Copy `intro_msg.template` to `intro_msg` and set a proper introduction message, which can be shown with `!intro`
170
+
5. Copy _intro_msg.template_ to _intro_msg_ and set a proper introduction message, which can be shown with `!intro`
175
171
6.`docker build -t ota-challenge-bot .`
176
172
7.`docker run -it --rm --name live-ota-challenge-bot ota-challenge-bot`
177
173
178
174
179
175
## Development
180
176
181
-
1. Copy `config/config.json.template` to `config/config.json`
182
-
2. Fill the API token and bot name in the config.json file.
177
+
1. Copy _config/config.json.template_ to _config/config.json_
178
+
2. Fill the API token and bot name in the _config.json_ file.
183
179
3. Create a virtual env: `python3 -m venv .venv`
184
180
4. Enter the virtual env: `source .venv/bin/activate`
1. Copy `config/config_solvetracker.json.template` to `config/config_solvetracker.json`.
186
+
1. Copy _config/config_solvetracker.json.template_ to _config/config_solvetracker.json_.
191
187
2. Configure the git account, the local repo and the remote path, which should be used to access your git repository.
192
188
193
189
Example:
@@ -202,20 +198,20 @@ Example:
202
198
}
203
199
```
204
200
205
-
Alternatively, you may decide to omit the "git_repopass" entry. In such an event (or if the entry is left blank) then the handler will attempt to push to the configured "git_remoteuri" using the `git` protocol, including using any SSH identities you may have configured.
201
+
Alternatively, you may decide to omit the `git_repopass` entry. In such an event (or if the entry is left blank) then the handler will attempt to push to the configured "git_remoteuri" using the `git` protocol, including using any SSH identities you may have configured.
206
202
Note: If you configure the solvetracker this way, you need to make sure you are using an SSH identity without a passphrase.
207
203
208
204
3. Update the templates in `templates` according to your preferences (or go with the default ones).
209
-
4. Make sure that there's a `_posts` and `_stats` folder in your git repository.
205
+
4. Make sure that there's a __posts_ and __stats_ folder in your git repository.
210
206
5. You should be good to go now and git support should be active on the next startup. You can now use the `postsolves` command to push blog posts with the current solve status to git.
211
207
212
208
213
209
## Using Link saver
214
210
215
211
1. Setup a github repo with jekyll and staticman (e.g. https://github.com/ujjwal96/links).
216
-
2. Copy `config/config_savelink.json.template` to `config/config_savelink.json`.
212
+
2. Copy _config/config_savelink.json.template_ to _config/config_savelink.json_.
217
213
3. Configure the git repo and branch to be used.
218
-
4. Add the decrypted staticman-token used in `staticman.yml` in the config.
214
+
4. Add the decrypted staticman-token used in _staticman.yml_ in the config.
219
215
5. Add a link to your repo, so people can look it up via `showlinkurl`
220
216
221
217
Example:
@@ -231,7 +227,7 @@ Example:
231
227
232
228
## Archive reminder
233
229
234
-
To enable archive reminders set an offset (in hours) in `config/config.json` for `archive_ctf_reminder_offset`. Clear or remove the setting to disable reminder handling.
230
+
To enable archive reminders set an offset (in hours) in _config/config.json_ for `archive_ctf_reminder_offset`. Clear or remove the setting to disable reminder handling.
235
231
236
232
If active, the bot will create a reminder for every bot admin on `!endctf` to inform him, when the ctf was finished for the specified time and it should be archived.
237
233
@@ -245,7 +241,7 @@ Example (for being reminded one week after the ctf has finished):
245
241
246
242
## Log command deletion
247
243
248
-
To enable logging of deleting messages containing specific keywords, set `delete_watch_keywords` in `config/config.json` to a comma separated list of keywords.
244
+
To enable logging of deleting messages containing specific keywords, set `delete_watch_keywords` in _config/config.json_ to a comma separated list of keywords.
249
245
Clear or remove the setting to disable deletion logging.
0 commit comments