Merge branch 'main' of ssh://git.zio.sh:2222/astra/telegram-join-approval-bot
This commit is contained in:
commit
5e37545782
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
|
@ -77,7 +77,7 @@ func main() {
|
|||
if update.Message.Chat.ID == b.Config.AdminChatId && update.Message.ReplyToMessage != nil {
|
||||
// handle admin declineion reason
|
||||
repliedMsg := update.Message.ReplyToMessage
|
||||
if strings.Contains(repliedMsg.Text, "(no reason provided, reply to this to send one, prepend with + to also send to user)") {
|
||||
if strings.Contains(repliedMsg.Text, "(no reason provided, reply to this to set one, prepend with + to also send to user)") {
|
||||
// now we need to make sure the one that declined it is the one replying
|
||||
lines := strings.Split(repliedMsg.Text, "\n")
|
||||
userString := ""
|
||||
|
|
@ -241,7 +241,7 @@ func (bot *Bot) handleCallbackQuery(query *api.CallbackQuery) {
|
|||
edit := api.NewEditMessageText(bot.Config.AdminChatId, user.JoinRequestMessageID,
|
||||
fmt.Sprintf(AdminDeclinedMsg,
|
||||
userString, user.From.ID, user.JoinReason, adminUserString, time.Now().Format("2006-01-02 15:04:05"),
|
||||
"(no reason provided, reply to this to send one, prepend with + to also send to user)"))
|
||||
"(no reason provided, reply to this to set one, prepend with + to also send to user)"))
|
||||
edit.ParseMode = api.ModeHTML
|
||||
bot.API.Send(edit)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue