gaypoints disallowed user message
This commit is contained in:
parent
cb5d3adf09
commit
d8bb106df6
1 changed files with 14 additions and 1 deletions
|
@ -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())
|
||||
|
||||
|
|
Loading…
Reference in a new issue