gaypoints disallowed user message

This commit is contained in:
Watn3y 2023-03-19 14:20:21 +01:00
parent cb5d3adf09
commit d8bb106df6

View file

@ -65,10 +65,23 @@ func GetGP(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
}
func SetGP(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
if !commonlogic.ContainsInt64(config.BotConfig.GayPoints.EnabledChats, update.Message.Chat.ID) || !commonlogic.ContainsInt64(config.BotConfig.GayPoints.ModifyUsers, update.Message.From.ID) {
if !commonlogic.ContainsInt64(config.BotConfig.GayPoints.EnabledChats, update.Message.Chat.ID) {
return
}
if !commonlogic.ContainsInt64(config.BotConfig.GayPoints.ModifyUsers, update.Message.From.ID) {
if update.Message.ReplyToMessage == nil {
message := tgbotapi.MessageConfig{
BaseChat: tgbotapi.BaseChat{ChatID: update.Message.Chat.ID, ReplyToMessageID: update.Message.MessageID},
ParseMode: "html",
DisableWebPagePreview: false,
Text: "Who the fuck do you think you are telling me what to do?",
}
botIO.SendMessage(message, bot)
return
}
}
cmd := strings.ToLower(update.Message.Command())
commandArgs := strings.Fields(update.Message.CommandArguments())