Skip to content

Commit

Permalink
fix: if ...else
Browse files Browse the repository at this point in the history
  • Loading branch information
AshokShau committed Jul 28, 2024
1 parent 1361526 commit 879f93a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions FallenSub/modules/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ var StartTime = time.Now()
func start(b *gotgbot.Bot, ctx *ext.Context) error {
if ctx.EffectiveChat.Type == gotgbot.ChatTypePrivate {
_ = db.AddUser(b.Id, ctx.EffectiveMessage.From.Id)
} else {
_ = db.AddChat(b.Id, ctx.EffectiveChat.Id)
}

_ = db.AddChat(b.Id, ctx.EffectiveChat.Id)

text := fmt.Sprintf("Hello, %s!\n\nI am a bot that can help you manage your group by forcing users to join a channel before they can send messages in the group.\n\nTo get started, add me to your group and make me an admin with ban users permission. Then, set the channel that you want users to join using /fsub command.\n\nFor more information, click the button below.", ctx.EffectiveMessage.From.FirstName)
button := gotgbot.InlineKeyboardMarkup{
InlineKeyboard: [][]gotgbot.InlineKeyboardButton{
Expand Down

0 comments on commit 879f93a

Please sign in to comment.