candy
This commit is contained in:
parent
918a7c0f41
commit
2d8b850bc6
9
main.go
9
main.go
|
@ -216,7 +216,7 @@ func candy(s *discordgo.Session, channel string, droptype string) {
|
|||
}
|
||||
|
||||
drop := candy1
|
||||
if droptype != "" {
|
||||
if droptype == "" {
|
||||
rand.Seed(time.Now().Unix())
|
||||
switch rand.Intn(40) {
|
||||
case 1, 2:
|
||||
|
@ -1307,8 +1307,11 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||
|
||||
if strings.HasPrefix(m.Content, "pp!spawncandy") && m.Author.ID == "228911057316347905" {
|
||||
arg := strings.Split(m.Content, " ")
|
||||
s.ChannelMessageSend(m.ChannelID, arg[1])
|
||||
candy(s, m.ChannelID, arg[1])
|
||||
if len(arg) < 2 {
|
||||
candy(s, m.ChannelID, "")
|
||||
} else {
|
||||
candy(s, m.ChannelID, arg[1])
|
||||
}
|
||||
}
|
||||
|
||||
if strings.HasPrefix(m.Content, "pp!db") && m.Author.ID == "228911057316347905" {
|
||||
|
|
Loading…
Reference in New Issue