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
+19-7Lines changed: 19 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,7 @@ Task object or list of task objects. Task objects have the following properties:
180
180
-`runAtStart`: Boolean value for whether or not the task should be run immediately. Defaults to false.
181
181
182
182
#### `secure`
183
+
183
184
If `true`, the bot will use HTTPS. If `false`, it will use HTTP. Default value is `true`.
184
185
185
186
#### `dbFile`
@@ -222,9 +223,9 @@ The actions are as follows, grouped by access level in ascending order:
222
223
-`getComment(form: GetComment)`: Retrieve a comment based on its ID.
223
224
-`getParentOfComment(form: Comment)`: Retrieves the parent of a comment. Accepts a comment object, which is returned from handlers that deal with comments (e.g. comment handler, mention handler, reply handler, etc.). Returns an object with the following properties:
224
225
-`type``"post"` or `"comment"`
225
-
When `type` is `"post"`:
226
+
When `type` is `"post"`:
226
227
-`post`: `GetPostResponse`
227
-
When `type` is `"comment"`:
228
+
When `type` is `"comment"`:
228
229
-`comment`: `CommentResponse`
229
230
-`isCommunityMod(form: {community: Community, person: Person})`: Returns whether or not a person is a moderator of a given community.
230
231
@@ -275,6 +276,12 @@ The actions are as follows, grouped by access level in ascending order:
275
276
-`comment_id` number
276
277
-`content`_optional_ string
277
278
-`language_id`_optional_ number
279
+
-`listMedia(form: ListMedia)`: List all media that was posted by the bot. The `form` argument is optional and has the following properties:
280
+
-`page`: number
281
+
-`limit`: number
282
+
-`hidePost(form: HidePost)`: Hide posta so they don't show up in your feed. The `form` argument has the following properties:
283
+
-`postIds`: number[]
284
+
-`hide`: boolean
278
285
279
286
#### Community moderator
280
287
@@ -317,12 +324,12 @@ The actions are as follows, grouped by access level in ascending order:
317
324
318
325
-`getCommentVotes(form: ListCommentLikes)`: Show who voted on a comment, and what their vote is. Accepts an object with the following properties:
319
326
-`comment_id` number
320
-
-`page`__optional__ number
321
-
-`limit`__optional__ number
327
+
-`page`**optional** number
328
+
-`limit`**optional** number
322
329
-`getPostVotes(form: ListPostLikes)`: Show who voted on a post, and what their vote is. Accepts an object with the following properties:
323
330
-`post_id` number
324
-
-`page`__optional__ number
325
-
-`limit`__optional__ number
331
+
-`page`**optional** number
332
+
-`limit`**optional** number
326
333
-`banFromSite(form: BanFromSite)`: Ban or unban a user from the instance. Accepts an object with the following properties:
327
334
-`person_id` number
328
335
-`ban` number
@@ -332,12 +339,17 @@ The actions are as follows, grouped by access level in ascending order:
332
339
-`approveRegistrationApplication(form: ApproveRegistrationApplication)`: Approve the creation of an account. Accepts an object with the following properties:
333
340
-`id` number
334
341
-`approve` boolean
335
-
-`deny_reason`__optional__ string
342
+
-`deny_reason`**optional** string
343
+
-`listAllMedia(form: ListMedia)`: List all media that has been posted on the instance. Optionally accepts an object with the following properties:
344
+
-`page`: number
345
+
-`limit`: number
336
346
337
347
## HTTP Client
348
+
338
349
If you need to use the [lemmy client](https://github.com/LemmyNet/lemmy-js-client) directly, the `__httpClient__` property is available so you don't need add it to your project separately. For your convenience, you can also access this in paramaters for polled event handlers and scheduled tasks.
339
350
340
351
## Running Your Bot
352
+
341
353
There are templates for docker and systemd in the templates folder to help you run your bot once you've made it.
0 commit comments