reminder-bot / reminder-rs

**MOVED** Please go to https://gitea.jellypro.xyz/jude/reminder-bot
https://gitea.jellypro.xyz/jude/reminder-bot
GNU Affero General Public License v3.0
48 stars 10 forks source link

[feature request] multiple commands in the same message or ability to switch ignore_bot() rule at the scale of a server #5

Closed LoganTann closed 2 years ago

LoganTann commented 3 years ago

Hello,

Context

I fixed a bit the issue I had explained in #3 by creating a tool to generate automatically a lot of commands. Due to the lockdown, I use reminder bot to send the link of our courses at the right time, but since there is more than 6 reminders a day, a tool to visually generate commands from a template helps a lot :

image

It saves a lot of time. But the main problem is to paste one by one this succession of commands to make it work.

Solution 1

Being able to send one by one each commands by webhook is a solution ... if the bot can interpret another bot message. To allow this, an option is to change the environment variable used by the ignore_bot() rule by a server-scope variable (like how the current timezone is stored). But I think such thing might not work because this rule acts globally, and not in the scope of the discord server. Or at least, this is possible by catching all messages and check if the sender is a legacy user. If not, we have to check if the server rule have to ignore it or not.

Solution 2

Another (better) option might be creating a syntax that allows multiple commands. A possible syntax might be :

$n "time" send "message" every "repetition" to "channels/users" $$ "time" send "message" every "repetition" to "channels/users"

If the string contains "$$", the bot will just have to split the message with the double dollars as the token, and try to parse each separated parts If it does not contain "$$", no need to split anything, just treat the whole thing as a single command.

Thanks in advance !

JellyWX commented 3 years ago

On the hosted version, we can't allow bots to interact with our bot. This is generally something that is expected between bots on Discord; we don't want to allow bots to form 'loops' with each other e.g where this bot triggers a bot that then retriggers this bot.

Allowing stringing commands together is an interesting suggestion though. It might be somewhat far down the pipeline, since there's other stuff I want/need to work on, but I'll consider it for sure

JellyWX commented 2 years ago

"macros" allows for this functionality :)