Add a # to ignore messages

This would allow for coordination when you can't send another number.
for example:
```
A 15
B 16
*B deletes 16*
B #hey 16 was already counted - here jia does not go brr
This commit is contained in:
Scott Little 2021-02-22 10:44:58 -06:00 committed by GitHub
parent ad7207c15f
commit bc8d295e0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,7 @@ import (
"sort"
"strconv"
"time"
"strings"
"github.com/slack-go/slack"
"github.com/slack-go/slack/slackevents"
@ -23,7 +24,7 @@ func HandleInnerEvent(slackClient *slack.Client, innerEvent *slackevents.EventsA
func onMessage(slackClient *slack.Client, event *slackevents.MessageEvent) {
// Ignore messages that aren't in the target channel, or are non-user messages.
if event.Channel != jiaConfig.ChannelID || event.User == "USLACKBOT" || event.User == "" {
if event.Channel != jiaConfig.ChannelID || event.User == "USLACKBOT" || event.User == "" || strings.HasPrefix(event.Text, "#") {
return
}