Skip to content

Commit

Permalink
refactor: change thursday gif
Browse files Browse the repository at this point in the history
  • Loading branch information
Luisgustavom1 committed Apr 1, 2023
1 parent 37d2a46 commit 60600e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package config

import (
"log"
"os"
"strconv"
)
Expand Down Expand Up @@ -40,3 +41,11 @@ func Load() (*Config, error) {

return cfg, nil
}

func GetConfig() {
if !cfg {
log.Fatal("You must load the config")
}

return cfg
}
5 changes: 2 additions & 3 deletions handlers/friday.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"strings"
"time"

"io"
"net/http"

Expand Down Expand Up @@ -83,9 +82,9 @@ func FridayHandler(s *discordgo.Session, m *discordgo.MessageCreate) {

message.Files = append(message.Files, processGifUrl(randomFridayGifUrl))
case time.Thursday:
message.Content = "Quasee, mas ainda não"
message.Content = "Quase, mas ainda não"

randomThursdayGif := getRandomGif("falta-um-dia")
randomThursdayGif := getRandomGif("quase-la")
randomThursdayGifUrl := extractGifFromGTenor(randomThursdayGif, fallbackGifUrl)

message.Files = append(message.Files, processGifUrl(randomThursdayGifUrl))
Expand Down

0 comments on commit 60600e7

Please sign in to comment.