Add approval message

This commit is contained in:
Astra 2026-01-28 16:56:41 +00:00
parent c3402bb973
commit 18e606f368
2 changed files with 10 additions and 7 deletions

View file

@ -41,6 +41,7 @@ func (c *Config) CreateConfig() error {
AdminChatId: 0,
TargetChatId: 0,
EntryMessage: "You have requested to join the group, please write a brief message explaining why you want to join.",
ApprovalMessage: "",
}
encoder := yaml.NewEncoder(f)

View file

@ -147,9 +147,11 @@ func (bot *Bot) handleCallbackQuery(query *api.CallbackQuery) {
edit.ParseMode = api.ModeMarkdown
bot.API.Send(edit)
if bot.Config.ApprovalMessage != "" {
m := api.NewMessage(user.From.ID, bot.Config.ApprovalMessage)
m.ParseMode = api.ModeMarkdown
bot.API.Send(m)
}
case "reject":
r := api.DeclineChatJoinRequest{