Files
nignoggobot/commands/kekget.go
2025-06-25 15:53:42 +02:00

67 lines
1.5 KiB
Go

package commands
import (
"fmt"
"math/rand"
"strings"
"time"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
)
type KekgetCommand struct{}
func (k KekgetCommand) Name() string {
return "kekget"
}
func (k KekgetCommand) Help() string {
return "Try to get a KEK or KKK, or even a multiKEK. Usage: /kekget"
}
func (k KekgetCommand) Execute(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
result := generateKekget()
msg := tgbotapi.NewMessage(update.Message.Chat.ID, result)
bot.Send(msg)
}
func generateKekget() string {
rand.Seed(time.Now().UnixNano())
// Generate random length between 1 and 20
length := rand.Intn(20) + 1
var text strings.Builder
for i := 0; i < length; i++ {
if rand.Float64() > 0.5 {
text.WriteString("K")
} else {
text.WriteString("E")
}
}
result := text.String()
// Check for special patterns
switch result {
case "KEK":
return fmt.Sprintf("%s\nYOU WIN TOPKEK!!!", result)
case "KKK":
return fmt.Sprintf("%s\nYOU WIN TOPKKK HEIL HITLER!!!", result)
case "KEKKEK":
return fmt.Sprintf("%s\nYOU WIN DOUBLE TOPKEKKEK!!!", result)
case "KEKKEKKEK":
return fmt.Sprintf("%s\nYOU WIN ULTIMATE TRIPLE TOPKEKKEKKEK!!!", result)
case "KEKKEKKEKKEK":
return fmt.Sprintf("%s\nQUADDRUPPLE TOPKEKKEKKEKKEK!!! YOU ARE GAY!!!", result)
case "KEKKEKKEKKEKKEK":
return fmt.Sprintf("%s\nQUINTUPLE TOPKEKKEKKEKKEKKEK!!! UNBELIEVABLE M8!!!", result)
default:
return fmt.Sprintf("%s\nLength: %d", result, len(result))
}
}
func init() {
Register(KekgetCommand{})
}