Change rate to silently ignore (#6)

Change rate to silently ignore

Signed-off-by: Etzelia <etzelia@hotmail.com>

Reviewed-on: https://git.etztech.xyz/Etzelia/sedbot/pulls/6
ban
Etzelia 2020-07-02 23:33:47 +02:00
parent 7d6b11ee2f
commit 66a418261e
4 changed files with 3 additions and 7 deletions

View File

@ -24,7 +24,7 @@ func init() {
}, },
run: func(cmd commandInit) (string, error) { run: func(cmd commandInit) (string, error) {
if !memeRateLimit.Try() { if !memeRateLimit.Try() {
return "Woah, slow down!", nil return "", nil
} }
req, err := http.NewRequest(http.MethodGet, dadJokeAPI, nil) req, err := http.NewRequest(http.MethodGet, dadJokeAPI, nil)

View File

@ -17,10 +17,6 @@ func init() {
return true return true
}, },
run: func(cmd commandInit) (string, error) { run: func(cmd commandInit) (string, error) {
if !memeRateLimit.Try() {
return "Woah, slow down!", nil
}
args := strings.Fields(cmd.message.Content) args := strings.Fields(cmd.message.Content)
if len(args) < 2 { if len(args) < 2 {
return "You must give this command a Minecraft username", nil return "You must give this command a Minecraft username", nil

View File

@ -9,7 +9,7 @@ func init() {
}, },
run: func(cmd commandInit) (string, error) { run: func(cmd commandInit) (string, error) {
if !memeRateLimit.Try() { if !memeRateLimit.Try() {
return "Woah, slow down!", nil return "", nil
} }
sendTyping(cmd.session, cmd.message.ChannelID) sendTyping(cmd.session, cmd.message.ChannelID)

View File

@ -14,7 +14,7 @@ func init() {
}, },
run: func(cmd commandInit) (string, error) { run: func(cmd commandInit) (string, error) {
if !memeRateLimit.Try() { if !memeRateLimit.Try() {
return "Woah, slow down!", nil return "", nil
} }
fields := strings.Fields(cmd.message.Content) fields := strings.Fields(cmd.message.Content)