Compare commits

..

No commits in common. "b1f9b721fda0bc63ac74ed15620850e024c502ba" and "95c1d2cca5852ceabc6eb6537dc080f12958b4a5" have entirely different histories.

2 changed files with 0 additions and 35 deletions

View File

@ -53,14 +53,10 @@ func (app *application) messageCreate(s *discordgo.Session, m *discordgo.Message
app.sendTuesday(s, m) app.sendTuesday(s, m)
case "wednesday": case "wednesday":
app.sendWednesday(s, m) app.sendWednesday(s, m)
case "friday":
app.sendFriday(s, m)
case "github", "source": case "github", "source":
app.sendGithub(s, m) app.sendGithub(s, m)
case "peski", "rotterdam": case "peski", "rotterdam":
app.sendPeski(s, m) app.sendPeski(s, m)
case "proper", "based":
app.sendProper(s, m)
/* --- Bot commands for words --- */ /* --- Bot commands for words --- */
case "spam": case "spam":
app.sendManyPepes(s, m, splitCommand) app.sendManyPepes(s, m, splitCommand)

View File

@ -4,7 +4,6 @@ import (
"errors" "errors"
"fmt" "fmt"
"io" "io"
"math/rand"
"net/http" "net/http"
"strconv" "strconv"
"strings" "strings"
@ -116,22 +115,6 @@ func (app *application) sendWednesday(s *discordgo.Session, m *discordgo.Message
} }
} }
func (app *application) sendFriday(s *discordgo.Session, m *discordgo.MessageCreate) {
if time.Now().Weekday().String() != "Friday" {
_, err := s.ChannelMessageSend(m.ChannelID, "This command only works on fridays")
if err != nil {
app.errorLog.Print(err)
return
}
return
}
_, err := s.ChannelMessageSend(m.ChannelID, "https://www.youtube.com/watch?v=kfVsfOSbJY0")
if err != nil {
app.errorLog.Print(err)
return
}
}
func (app *application) sendGithub(s *discordgo.Session, m *discordgo.MessageCreate) { func (app *application) sendGithub(s *discordgo.Session, m *discordgo.MessageCreate) {
_, err := s.ChannelMessageSend(m.ChannelID, "My code is hosted publicly over at https://github.com/DutchEllie/pepebot") _, err := s.ChannelMessageSend(m.ChannelID, "My code is hosted publicly over at https://github.com/DutchEllie/pepebot")
if err != nil { if err != nil {
@ -148,20 +131,6 @@ func (app *application) sendPeski(s *discordgo.Session, m *discordgo.MessageCrea
} }
} }
func (app *application) sendProper(s *discordgo.Session, m *discordgo.MessageCreate) {
responseList := []string{"That's proper", "I use Gentoo", "So based", "That's best practice", "Emacs is the best", "Lisp is so fucking based", "My website is here https://forestofunix.xyz\nIt's written in Lisp. It's so based!"}
source := rand.NewSource(time.Now().UnixNano())
rng := rand.New(source)
index := rng.Intn(len(responseList))
_, err := s.ChannelMessageSend(m.ChannelID, fmt.Sprintf("\"%s\"\n-Sebastiaan", responseList[index]))
if err != nil {
app.errorLog.Print(err)
return
}
}
func (app *application) sendManyPepes(s *discordgo.Session, m *discordgo.MessageCreate, splitCommand []string) { func (app *application) sendManyPepes(s *discordgo.Session, m *discordgo.MessageCreate, splitCommand []string) {
override := false override := false