1
3
submitted 1 year ago by [email protected] to c/[email protected]

shared from: https://lemmy.world/post/2809416

We've launced a public discord server at https://discord.gg/lemmyworld

The reason for why we choose discord is because it was easier to moderate and manage than other options. Besides we also had a discord-bot guru by the name of Rooki who created a neat bot that allowed us to connect/verify discord users to their Lemmy World account.

So if you are a moderator and you are looking for some extra hands to moderate your community, or if you need to contact anyone from the LW team, this is the most efficient way to do it!

Come have a look!

2
4
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]

Lemmy Bot Best (Coding) Practices

Because of the increasing amount of Bots on lemmy and there is not (yet) a written Best (Coding) Practices post i want to make such Guideline.

The bot is required to follow the instances rules.

Guidelines

General Guidelines

1. Bots should stagger their calls to different endpoints to reduce the strain on the serverFor example, instead of calling all three endpoints (Posts, Comments, and Reports) every 30 seconds, you could call Posts every 30 seconds, Comments every 35 seconds, and Reports every 45 seconds. This would spread out the load on the server and prevent it from becoming overloaded.

2. Bots should only fetch data that they really need.For example, a spell-checking bot does not need to fetch reports. This will help to reduce the amount of data that your bot needs to store, which will improve performance.

3. Bots should use a cache to store data that is required more often than 30 seconds.This will improve performance and the strain to the server by reducing the number of times that your bot needs to fetch the data from the server.

4. Bots should remove unused data from their database on a regular basis.This will free up space and improve performance.

5. Bots should be crash-safe, meaning that they should be able to recover from unexpected errors.This can be done by using error handling techniques and by storing important data in a way that can be easily recovered and use a Backoff system to increase the retry time until it reaches a limit to stop completly.

6. Bots should add a delay to API-heavy commands and actions.This will help to prevent the server from becoming overloaded.

7. Bots should not connect to multiple instances at a time.This can cause conflicts and errors.

8. Bots should secure their servers.This includes using strong passwords and keeping their software up to date.

9. If you are unsure if your bot is working properly, you should contact your local instanceadmin. They can help you to troubleshoot any problems.
10. Bots should ignore other bots for commands or DMs.This helps to prevent loops.
11. Bots should only fetch the communities that they should interact with.This helps to reduce load on the server.
12. Global bots should be opt-in or have an opt-out feature.This gives users control over whether or not they want to interact with your bot.
13. Bots should have the Bot flag activated AND include the word "bot" or other bot-related words in their name.This helps users to identify your bot and understand its purpose.

For Improvment ideas leave a comment!

3
3
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]

I've recently started getting API responses from an instance at lemmy.thesanewriter.com that seem to be a change in specification, or maybe a bug.

GetCommunityResponse: moderators: List[CommunityModeratorView]

CommunityModeratorView moderator: Person

Person: admin: bool

The admin field is no longer being supplied.

Does anyone have any insight into the cause/source of this change?

Thanks in advance.

4
4
submitted 1 year ago by [email protected] to c/[email protected]

I'm trying to work out how to get a parent comment (if any) of a comment. The API documentation lists an attribute of comments 'path', which seems to hold a real, but it doesn't explain anywhere (that I could find), how to derive the parent comment from that.

Can anyone point me towards a resource to help me work this out?

Thanks in advance.

5
7
submitted 1 year ago by [email protected] to c/[email protected]

Written in Python. Originally started to flag toxic content for Mod followup, but it’s growing to do other things too.

Still very much a work in progress. Currently in use in !asklemmy

https://github.com/noenfugler/LemmyModBot

Lemmy Bot Support

69 readers
1 users here now

Lemmy Bot Support

Here you can get help and share tips for developing Bots

Resources

Docs

Lemmy API Libraries

Tags

[Meta] - For meta posts about this community

[Showcase] - For Showcasing of a bot / library

[Help] - For asking for help

Partners

Hedges Development

A community of developers and users who are interested in development, privacy and security.

Lemmy JS API

A community focused on developing with the javascript library of the Lemmy API

How to become mod

To become a mod, you need to be active in the community and help people out. If you are active and helpful, you will be invited to become a mod.

founded 1 year ago
MODERATORS