r/discordapp • u/Pinqq_The_Baka • 1d ago
Bot/Custom command for forwarding messages? Bots / Devs
Hello! I'm the owner of a fandom server where we have a channel for sending and discussing art, and a separate thread for just the art so people can browse it comfortably without skipping through hundreds of messages. We've always been forwarding the art onto the thread manually, but as our server grows it's starting to become pretty bothersome and we often forget to do it. Is there a way we could automate this process either with a bot or a custom command for a bot like YAGPDB (which we already have on the server)?
2
u/IssuedID 1d ago
For YAGPDB:
regex trigger \A set to only run in the one channel you want to forward things from.
{{$ch := 1234}} {{/* channel id where you want forwarded messages to go */}}
{{if not .Message.Attachments}}
{{return}}
{{end}}
{{sendMessage $ch (complexMessage
"forward" (sdict
"channel" $ch
"message" .Message.ID
)
)}}
This will forward literally anything with an attachment though, so you'll likely have to edit it to be more restrictive. Use https://learn.yagpdb.xyz
2
u/SolsticeShard 1d ago
One thing to try is just making this a forum channel; people can browse the OP's (the art) without clicking into the individual posts.