Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Beniamiiin committed Feb 13, 2024
1 parent 2ce20da commit aaa5c27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/tg_bot/commands/access_governance_bot/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ func (c *startCommand) Handle(command, arguments string, user *models.User, bot
func (c *startCommand) createInstructionMessageForSeeder(bot *tgbotapi.BotAPI, chatID int64) tgbotapi.Chattable {
seedersChatInviteLink, err := tgbot.CreateChatInviteLink(bot, c.config.App.SeedersChatID)
if err != nil {
c.logger.Fatalf("could not create seeders chat invite link: %v", err)
c.logger.Errorf("could not create seeders chat invite link: %v", err)
return nil
}

membersChatInviteLink, err := tgbot.CreateChatInviteLink(bot, c.config.App.MembersChatID)
if err != nil {
c.logger.Fatalf("could not create members chat invite link: %v", err)
c.logger.Errorf("could not create members chat invite link: %v", err)
return nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (h *accessGovernanceBotCommandHandler) handleNewChatMembers(bot *tgbotapi.B
if user.Role == models.UserRoleSeeder {
seedersChatInviteLink, err := tgbot.CreateChatInviteLink(bot, h.config.App.SeedersChatID)
if err != nil {
h.logger.Fatalf("could not create seeders chat invite link: %v", err)
h.logger.Errorf("could not create seeders chat invite link: %v", err)
continue
}

Expand All @@ -242,7 +242,7 @@ func (h *accessGovernanceBotCommandHandler) handleNewChatMembers(bot *tgbotapi.B
2. Подключиться к нашему discord серверу - %s
3. Отправить команду %s в чате в discord
`, newChatMember.FirstName, h.config.App.CommunityName, seedersChatInviteLink, h.config.DiscordInviteLink, "`!authorize`")
} else if user.Role == models.UserRoleMember {
} else if user.Role == models.UserRoleGuest {
messageText = fmt.Sprintf(`
Привет, %s! Добро пожаловать в сообщество %s.
Expand Down

0 comments on commit aaa5c27

Please sign in to comment.