Bots

1 readers
0 users here now

An informational community about Lemmygrad's non-organic comrades.

If you own a bot and would like to become a mod and post something here, please message @[email protected], and I'll add you.

Posts here should be about Lemmygrad bots. They should showcase the various features that the bot has and describe them. If your bot has a config, you can provide it here as well if you so wish.

Please test the bot in the Bot Test community to make sure it's working before trying to showcase it here, in order to avoid cluttering the posts with commands that didn't work.

If your bot gains a new feature, simply add a new comment to the post showcasing the feature and edit the post to include it, don't make a new post for each change. This will make it easier for people to find the capabilities of your bot as they won't have to search through multiple posts.

founded 2 years ago
MODERATORS
1
1
TankieReplyBot (lemmygrad.ml)
submitted 2 years ago* (last edited 10 months ago) by [email protected] to c/[email protected]
 
 

This post is about @[email protected]. It's a configurable bot running my lemmy-reply-bot software.

Currently, it has the following functionality:

  • If one or more YouTube links are detected in a comment or post, the bot will reply with links to the same video on three different Invidious instances.
  • If one or more Reddit links are detected in a comment or post, the bot will reply with links to the same location on various Teddit and Libreddit instances.
  • If one or more URLs preceded by !archive are detected in a comment or post, the bot will reply with links to various archive sites for the URL.

Config file for my instance of the bot

[lemmy]
instanceURL = "wss://lemmygrad.ml"

[lemmy.account]
userOrEmail = "TankieReplyBot"
password = 'Insert Password Here'

[[reply]]
regex = '!archive (https?)://([.\w\d]+\.[\w\d]{2,4}[\w\d?&=%/.-]*)'
msg = '''
Here are the archive links you requested:

{{range $i, $match := .Matches}}
{{if len $.Matches | ne 1}}Link {{add $i 1}}:{{end}}
- [archive.vn](https://archive.vn/{{$match.Item 1}}://{{$match.Item 2}})
- [archive.org](https://web.archive.org/web/{{$match.Item 1}}://{{$match.Item 2}})
- [ghostarchive.org](https://ghostarchive.org/search?term={{$match.Item 1}}://{{$match.Item 2}})
{{end}}
'''

[[reply]]
regex = '!paywall (https?)://([.\w\d]+\.[\w\d]{2,4}[\w\d?&=%/.-]*)'
msg = '''
One of these links should get rid of the paywall! :3

{{range $i, $match := .Matches}}
{{if len $.Matches | ne 1}}Link {{add $i 1}}:{{end}}
- [1ft.io](https://1ft.io/{{$match.Item 1}}://{{$match.Item 2}})
- [12ft.io](https://12ft.io/{{$match.Item 1}}://{{$match.Item 2}})
- [archive.ph](https://archive.ph/{{$match.Item 1}}://{{$match.Item 2}})
{{end}}
'''

[[reply]]
regex = '(https?)://(www\.google\.com/amp/s/([.\w\d]+\.[\w\d]{2,4}[\w\d?&=%/.-]*))'
msg = '''
I found {{if len .Matches | eq 1}}a Google AMP link{{else}}Google AMP links{{end}} in your {{.Type}}! I've removed Google's spyware for you! :3

{{range $i, $match := .Matches}}
{{if len $.Matches | ne 1}}Link {{add $i 1}}:{{end}}
- [Regular Link]({{$match.Item 1}}://{{regexReplaceAll `/?\.?amp` ($match.Item 3) ""}})
{{end}}
'''


[[reply]]
regex = 'https?://(?:(?:www|m)\.)?youtu(?:\.be/|be\.com/(?:watch\?v=|shorts/))([\w\d-]{11})[&?]?([\w\d?&=%/-]*)'
msg = '''
{{if len .Matches | eq 1}}A YouTube link was{{else}}YouTube links were{{end}} detected in your {{.Type}}. Here are links to the same {{if len .Matches | eq 1}}video{{else}}videos{{end}} on Invidious, which is a YouTube frontend that protects your privacy:

{{range $i, $match := .Matches}}
{{if len $.Matches | ne 1}}Link {{add $i 1}}:{{end}}
- [yewtu.be](https://yewtu.be/watch?v={{$match.Item 1}}&{{$match.Item 2}})
- [inv.zzls.xyz](https://inv.zzls.xyz/watch?v={{$match.Item 1}}&{{$match.Item 2}})
- [invidious.io.lol](https://invidious.io.lol/watch?v={{$match.Item 1}}&{{$match.Item 2}})
{{end}}
'''

[[reply]]
regex = 'https?://(?:www\.|old\.)?reddit\.com/((?:r|user)/[\w\d?&=%/-]*)'
msg = '''
{{if len .Matches | eq 1}}A Reddit link was{{else}}Reddit links were{{end}} detected in your {{.Type}}. Here are links to the same {{if len .Matches | eq 1}}location{{else}}locations{{end}} on Teddit and Libreddit, which are Reddit frontends that protect your privacy.

{{range $i, $match := .Matches}}
{{if len $.Matches | ne 1}}Link {{add $i 1}}:{{end}}
- [teddit.zaggy.nl](https://teddit.zaggy.nl/{{$match.Item 1}})
- [teddit.hostux.net](https://teddit.hostux.net/{{$match.Item 1}})
- [r.darklab.sh](https://r.darklab.sh/{{$match.Item 1}})
- [reddit.smnz.de](https://reddit.smnz.de/{{$match.Item 1}})
{{end}}
'''

[[reply]]
regex = 'https://(?:i\.)?imgur.com/((?:a|gallery)?/?[A-Za-z0-9]{5,8}(?:\.[a-zA-Z]+)?(?:[\w\d?&=%/.-]*))'
msg = '''
{{if len .Matches | eq 1}}An Imgur link was{{else}}Imgur links were{{end}} detected in your {{.Type}}. Here are links to the same {{if len .Matches | eq 1}}location{{else}}locations{{end}} on alternative frontends that protect your privacy.

{{range $i, $match := .Matches}}
{{if len $.Matches | ne 1}}Link {{add $i 1}}:{{end}}
- [imgur.artemislena.eu](https://imgur.artemislena.eu/{{$match.Item 1}})
- [rimgo.projectsegfau.lt](https://rimgo.projectsegfau.lt/{{$match.Item 1}})
- [imgin.voidnet.tech](https://imgin.voidnet.tech/{{$match.Item 1}})
{{end}}
'''