KevinNovak / Friend-Time

Discord bot - Friend Time helps your server coordinate times and events by converting times mentioned in chat between time zones!
https://novakevin.gitbook.io/friend-time
Other
66 stars 26 forks source link

Offer an explicit trigger for timezone list #91

Open juzerzarif opened 2 years ago

juzerzarif commented 2 years ago

Sometimes the Friend-Time bot will list timezones for a time mentioned in a message even when it's not particularly helpful. For example, say I message a channel

I was planning on leaving in 5 minutes

Friend-Time will trigger on "in 5 minutes" and list all the times in the server list. That can get kinda annoying. It would be nice if the timezone list feature could have an explicit trigger - something similar to the "react with ⏰" behavior that it uses for DMs. That way people in the server can prevent false positives.

If we think this is a worthwhile feature, I'm willing to help with a PR (just need some pointers 😅)

Davi-the-Mudkip commented 2 years ago

Sometimes the Friend-Time bot will list timezones for a time mentioned in a message even when it's not particularly helpful. For example, say I message a channel

I was planning on leaving in 5 minutes

Friend-Time will trigger on "in 5 minutes" and list all the times in the server list. That can get kinda annoying. It would be nice if the timezone list feature could have an explicit trigger - something similar to the "react with ⏰" behavior that it uses for DMs. That way people in the server can prevent false positives.

If we think this is a worthwhile feature, I'm willing to help with a PR (just need some pointers 😅)

How would the explicit trigger work?

juzerzarif commented 2 years ago

I would expect it to work pretty similar to the trigger for DMs. Friend-Time reacts with say 📃 to a message with a time it recognized. Someone in the channel also reacts to the message with 📃 at which point Friend-Time messages the channel with the list of times. Any subsequent reacts with 📃 don't trigger any more messages from Friend-Time.

What do you think @Davi-the-Mudkip

Davi-the-Mudkip commented 2 years ago

I would expect it to work pretty similar to the trigger for DMs. Friend-Time reacts with say 📃 to a message with a time it recognized. Someone in the channel also reacts to the message with 📃 at which point Friend-Time messages the channel with the list of times. Any subsequent reacts with 📃 don't trigger any more messages from Friend-Time.

What do you think @Davi-the-Mudkip

That's excellent!

KevinNovak commented 2 years ago

I like this idea, I think we would have to limit the trigger to maybe just admins or a certain role however. I'll consider adding this in a future update!

juzerzarif commented 2 years ago

I like this idea, I think we would have to limit the trigger to maybe just admins or a certain role however. I'll consider adding this in a future update!

Awesome, thank you! Imo a role would be the most convenient. So if you're in a server with all people you know, you can just give everyone that role. Let me know if I can help at all 🙂

AhmadMajid commented 2 years ago

Sorry I opened a new issue but realised the point has also been made here.

"It makes sense to make conversions when an explicit time is mentioned, for example: 8pm.

But it doesn't make sense to trigger a conversion when somebody says: in 15 minutes.

Every time a user says "in X time-unit" friend bot converting the time in chat is messy. Can something be done about this?"