Add delete request message config, update reason text

This commit is contained in:
Astra 2026-01-30 11:44:46 +00:00
parent 9605e894eb
commit 71b12970df
2 changed files with 30 additions and 14 deletions

View file

@ -8,12 +8,13 @@ import (
)
type Config struct {
BotToken string `yaml:"bot_token"`
AdminChatId int64 `yaml:"admin_chat_id"`
AdminChatTopicId int `yaml:"admin_chat_topic_id"`
TargetChatId int64 `yaml:"target_chat_id"`
EntryMessage string `yaml:"entry_message"`
ApprovalMessage string `yaml:"approval_message"`
BotToken string `yaml:"bot_token"`
AdminChatId int64 `yaml:"admin_chat_id"`
AdminChatTopicId int `yaml:"admin_chat_topic_id"`
TargetChatId int64 `yaml:"target_chat_id"`
EntryMessage string `yaml:"entry_message"`
ApprovalMessage string `yaml:"approval_message"`
DeleteRequestAfterDecision bool `yaml:"delete_request_after_decision"`
}
func (c *Config) LoadConfig() error {
@ -37,11 +38,12 @@ func (c *Config) CreateConfig() error {
defer f.Close()
defaultConfig := Config{
BotToken: "YOUR_BOT_TOKEN_HERE",
AdminChatId: 0,
TargetChatId: 0,
EntryMessage: "You have requested to join the group, please write a brief message explaining why you want to join.",
ApprovalMessage: "",
BotToken: "YOUR_BOT_TOKEN_HERE",
AdminChatId: 0,
TargetChatId: 0,
EntryMessage: "You have requested to join the group, please write a brief message explaining why you want to join.",
ApprovalMessage: "",
DeleteRequestAfterDecision: false,
}
encoder := yaml.NewEncoder(f)