Last active
September 11, 2018 01:37
-
-
Save rikatz/1093e4aa73f120ab1cfb401e4fec2365 to your computer and use it in GitHub Desktop.
Area 31 bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"os" | |
"regexp" | |
"github.com/go-telegram-bot-api/telegram-bot-api" | |
) | |
func main() { | |
token := os.Getenv("TELEGRAM_TOKEN") | |
if token == "" { | |
log.Panic("Environment Variable TELEGRAM_TOKEN not defined") | |
} | |
bot, err := tgbotapi.NewBotAPI(token) | |
if err != nil { | |
log.Panic(err) | |
} | |
log.Printf("Authorized on account %s", bot.Self.UserName) | |
u := tgbotapi.NewUpdate(0) | |
u.Timeout = 60 | |
updates, err := bot.GetUpdatesChan(u) | |
for update := range updates { | |
if update.Message == nil { | |
continue | |
} | |
log.Printf("[%s] %s", update.Message.From.UserName, update.Message.Text) | |
if regexp.MustCompile("[Gg][Nn][Uu]").MatchString(update.Message.Text) { | |
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "GNU é o caralho! Dá man init pra ver se tem gnu - https://area31.net.br/zuera/gnu.jpg") | |
msg.ReplyToMessageID = update.Message.MessageID | |
bot.Send(msg) | |
} | |
if regexp.MustCompile("^!regras").MatchString(update.Message.Text) { | |
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "Regras? Você quer controlar a vida dos outros é? Seu SOCIALISTA! Quer Estado pra ficar controlando a vida dos outros né seu filho da puta! Seu macaco! Seu bosta! Você deveria ir pra um GULAG SEXUAL seu merda! Você é daquele tipo de filho da puta que quer Estado mínimo né, e acha que imposto não é roubo se ele for bem aplicado né.... seu PAU NO CU do caralho! Vou enfiar o braço no seu cu e arrancar seu olho seu frequentador do Roadsec! Regra é minha mão na sua cara preta! Seu filho da puta! Você merece remoção física mesmo! Fica ae invocando o comando REGRAS pra ver seu coruja pau no cu!!") | |
msg.ReplyToMessageID = update.Message.MessageID | |
bot.Send(msg) | |
} | |
if regexp.MustCompile("Infosec Army").MatchString(update.Message.Text) { | |
msg := tgbotapi.NewContact(update.Message.Chat.ID, "+551124246969", "Gretchen") | |
msg.ReplyToMessageID = update.Message.MessageID | |
bot.Send(msg) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment