Lemmy.zip Mod Tools

Going to pin this for 24 hours so all mods hopefully get a chance to see it! Sorry!

As we continue to expand on the mod tools for Lemmy.zip community mods, I thought I’d better start keeping a collection of them in a post, what the tools do, and how they can be used.

All commands are invoked by sending a PM to ZippyBot with the relevant text commands.


Welcome Message

The Welcome Message feature allows a community mod to set a custom “Welcome message” for a community that gets sent to a user when they subscribe to a community.

Welcome Messages can be set up by sending the command #welcome -c community_name -m “welcome message” to ZippyBot. You’ll receive a reply back confirming this has been successful.

Anyone that subscribes to your community after this will receive the PM you set up. The PM will be sent by a bot account called WelcomeBot specifically set up for this task.

Important notes

  • The text of your welcome message must start and end with a speech/quote mark, i.e. “welcome text”.
  • You can use any punctuation/markdown you want, including emojis and links.
  • You can change the message by sending the same command with updated text.
  • You can delete the message entirely by using the command #welcomedelete community_name.

Example

https://lemmy.zip/pictrs/image/6a98bdb0-a138-4453-83bc-677423ca1e96.webp

The full code for this looks like:


<span style="color:#323232;">#welcome -c gaming -m “Welcome to the Lemmy.zip Gaming Community! 
</span><span style="color:#323232;">
</span><span style="color:#323232;">All content related to gaming on any platform is welcome here including links to news articles, discussions about the latest games, and reviews of games from across all genres.
</span><span style="color:#323232;">
</span><span style="color:#323232;">Please remember to follow the rules in the sidebar 😊 
</span><span style="color:#323232;">
</span><span style="color:#323232;">---
</span><span style="color:#323232;">
</span><span style="color:#323232;">*This is an automated message. Beep Boop.* " 
</span>

Autopost/Scheduled Posts

The Autopost/Scheduled Post features allows mods to set either a one-off or recurring post in their community, which is then pinned. If the post is a recurring post, the old post is unpinned and the new post is pinned when it is triggered.

A typical command would look like #autopost -c community_name -t post_title -b post_body -d day -h time -f frequency

  • -c - This defines the name of the community you are setting this up for. This is the original name of the community when you created it.
  • -t - This defines the title of the post. You can use the modifiers listed below here.
  • -b - This is the body of your post. This field is optional, so you don’t need to include it if you don’t want a body to your post. You can use the modifiers listed below here too.
  • -u - This defines a URL you can add to your post. This field is optional, so you don’t need to include it.
  • -d - This defines a date you want the first post to occur in YYYYMMDD format, i.e. 20230612 which would be 12th June 2023, or the day of the week you want your thread to be posted on, i.e. monday.
  • -h - This defines the time of the day you want this thread to be posted, i.e. 12:00. All times are UTC!
  • -f - This defines how often your thread will be posted. The options that currently exist are once, weekly, fortnightly, 4weekly, or monthly.

There are some modifiers you can use either in the title field (-t) or the body field (-b).

  • %d - This will be replaced by the day of the month, i.e. 12
  • %m - This will be replaced by the name of the month, i.e. June.
  • %y - This will be replaced by the current year, i.e. 2024
  • %w - This will be replaced by the day of the week, i.e. Monday. For example, having -t Weekly Thread %d %m might be created as Weekly Thread 12 June depending on the day it is posted.

Finally, if you want to delete a scheduled autopost, use the command #autopostdelete with the ID number of the autopost, i.e. #autopostdelete 1. You can also delete the latest pinned thread if you include y at the end, i.e #autopostdelete 1 y.

Important notes

  • Using the once frequency means your post will never be unpinned, you’ll need to do this manually.
  • The post will be created and pinned by ZippyBot, so you won’t receive replies to your inbox.
  • Because ZippyBot is an Admin, you won’t be able to delete its post - you can however make a reply to a post you want removed with #delete and ZippyBot will pick this up and remove its post.

Example

#autopost -c gaming -t What are you playing this week? %m %d %y Edition -b Hey there everybody! Weekly check in time once again. So… What are you playing this week? -d Monday -h 07:00 -f weekly

This creates the weekly thread in the Gaming community.


RSS Feeds

This allows a mod to add an RSS feed to their community, which ZippyBot will regularly check and create a new post if a new RSS post is detected.

A typical command would look like #rss -url rss_url -c community name - but there are a few modifiers you can use.

  • url - This is the URL of the rss feed, and is mandatory.
  • c - This is the community name and is mandatory.
  • t - This will tag your post titles with a preceding tag in square brackets, i.e. -t “RSS POST” will result in each post being tagged with [RSS POST]
  • title_inc - Adding this will mean that only posts that INCLUDE the string you define will be posted, i.e. -title_inc “title must be included”. The speech marks are mandatory if you use this option, and you can have multiple filters by using a commma between them.
  • title_exc - Adding this will EXCLUDE any posts that match this string, i.e. -title_exc “dont include this”. The speech marks are mandatory if you use this option.
  • url_inc - Adding this will filter the post based on the link to the content in the RSS feed. You can use it in a way such as -url_inc “goodlink.com” to ensure that only posts where the link to the content is for goodlink.com. Speech marks are mandatory.
  • url_exc - Adding this will exclude content based on the link to the content RSS feed, such as -url_exc “badlink.com”. Speech marks are mandatory.
  • new_only - Adding this will mean that on the creation of this RSS feed, ZippyBot won’t scan for existing posts and only start looking at posts after starting this feed.

Finally, if you want to delete an RSS feed from your community, use the command #rssdelete with the ID number of the RSS feed, i.e. #rssdelete 1.

Important notes

  • ZippyBot checks for new RSS posts every 10 minutes
  • ZippyBot makes the RSS post, so you won’t receive a notification of a reply to a post.
  • If you don’t use the -new_only flag, you’ll get the last 3 posts on the first time this command is used.

Example

#rss -url https://rss-url.xml -c gaming


As I develop new tools or work on existing ones, I’ll continue to add them here or update the commands.

We’re always on the lookout for what we can add too, so if you have any ideas for new tools we’re really open to hearing them and seeing if we can implement them.

Final important note - while all these tools work to some degree, I can’t guarantee they’re bug free. I may need to reset these at some point if a bug is discovered. Please let me know if anything doesn’t work as expected!___

GeekFTW,

Also just to confirm for us dumbs - For the Autopost feature, re: formatting for the body of the post. Quotes or no quotes? Does it support markdown as well like the welcome message does?

Demigodrick,

No quotes needed for the body of the autopost currently! Should fully support markdown, but if any issues let me know and I can have a look (it was the first one I made so not as flexible as the other two at the moment)

GeekFTW,

Will do!

GeekFTW,

Ok I set up the welcome post earlier with no issues yet. I got the confirmation dm from Zippy so unless if someone tells me otherwise in the next day or two, it should be fine.

Tried the autopost, I did not receive a confirmation of any kind from Zippy. Below is exactly how I formatted what I sent including spacing and such (which if I did it and read it correctly should have made an autopost around 7-8 mins ago but hasn’t:

-c squaredcircle -t SQ Autopost Test Post -b This is a test

Please ignore

Testing to ensure this works

Bot test beep boop -d 20240413 -h 1300 -f once

Demigodrick,

Ah yeah, I see the issue. The 1300 didn’t parse correctly (it expects 13:00) but I can add a check in for that in the next zippy version so it provides feedback on that

GeekFTW,

Whoops lol. Shall try again.

Edit: Got the confirmation, think it’ll work this time!

GeekFTW,

No go.

So I got this as a return from Zippy (I cut off the ID and lower).

https://lemmy.zip/pictrs/image/d347d38d-5cc1-4c9b-8596-fa1dcb9f8cd2.webp

So it accepted the request, tho the post body isn’t appearing in the confirmation. I set it for 2-3 mins after my last comment to you and it did not trigger.

Demigodrick,

Yeah, looking at it now - it doesn’t like split line bodies which is why it didn’t return it in the reply.

Just need to update the regex the bot uses to detect the body and will probably need to enforce “” like the welcome message to handle a split body.

Leave it with me! Thank you for testing it, all helps to discover issues like this :)

GeekFTW,

Figured that was gonna cause an issue lol. And no worries! :)

Demigodrick,

The post should pop up shortly without a body (one bug fixed) - I’ll let you know when the multi-line thing is fixed :)

GeekFTW, (edited )

I see it!

Edit: The bot does get tagged as an admin it seems, so I have no ability to now delete that post.

Demigodrick,

So, multiline bodies should be good now, and you can delete anything zippybot has posted in your community by replying to the post with #delete :)

GeekFTW,

Thanks again for the quick fixes!

So just got in and did some tests, with quotes in place in the title and body things look to be working flawless in that regard. However a new problem is popping up. I just tested out 2-3 threads, scheduling each of them 3-7 mins into the future (just to give the server and the bot time in case of traffic and since I’m not in a rush). Zippy is now auto posting the threads. We’re (as of this comment) still 6 mins away from when the most recent one I scheduled should appear, but it’s been there on the community for 2-3 mins now lmao. I do think it was working with the earlier tests but I might be wrong and just scheduled it quick so not sure.

One bug down, 4 more shall rise!

Demigodrick,

I think I’ve narrowed down that particular issue, in relation to UTC.

  • You put: -h 15:05
  • Zippy Replied: Time (UTC): 15:05
  • And then scheduled the post for 14:05:00+00:00

Which is because UTC is an hour behind UK time which is the timezone that was set. Which is now UTC as it should’ve been!

GeekFTW,

Still not working it seems, this is a weird one. The time offset looks correct, but it still autoposted.

lemmy.zip/post/13566509

Post URL:

Date (YYYYMMDD): 20240413

Time (UTC): 15:40

Frequency: once

Your next post date is: 2024-04-13 15:40:00+00:00

Demigodrick,

Ah, yeah, just clicked :) UTC is currently 17:44! Because its in the past it will just autopost it there and then!

GeekFTW,

…I really did that, didn’t I?

🤦‍♂️ It’s been a long day, sorry lol.

Proper test this time…alright looks like both Zippy and myself are working good now! Thanks for the help!

Demigodrick,

No worries haha, took me a while to realise too :)

Thanks for the help making it better, its not until people start to use the bugs and such pop up.

Demigodrick,

Nice catch, have deleted it and will put in a solution for that too

GeekFTW, (edited )

Love it, this’ll come in really handy.

Dempf,

Absolutely based admin.

CluelessDude,

Finally I can use and abuse my non existing mod powers.

Good work as always.

possiblylinux127,

Nice tools

tamlyn,
@tamlyn@lemmy.zip avatar

Thanks for this post and your work for our server

  • All
  • Subscribed
  • Moderated
  • Favorites
  • home@lemmy.zip
  • khanakhh
  • DreamBathrooms
  • cubers
  • cisconetworking
  • osvaldo12
  • magazineikmin
  • Youngstown
  • thenastyranch
  • rosin
  • slotface
  • Durango
  • mdbf
  • kavyap
  • tacticalgear
  • JUstTest
  • InstantRegret
  • normalnudes
  • modclub
  • ngwrru68w68
  • everett
  • GTA5RPClips
  • ethstaker
  • anitta
  • Leos
  • tester
  • provamag3
  • megavids
  • lostlight
  • All magazines