Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
JackBekket committed Oct 20, 2022
1 parent 7ef67c5 commit 66e1729
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,20 +287,41 @@ func main() {
// trust @todo: add functionality for trust
case 4:
if updateDb, ok := userDatabase[update.Message.From.ID]; ok {
if update.Message.Text == "WhoIs" {
msg := tgbotapi.NewMessage(userDatabase[update.Message.From.ID].tgid, msgTemplates["who_is"])
if update.Message.Text == "Trust/Untrust user" {
msg := tgbotapi.NewMessage(userDatabase[update.Message.From.ID].tgid, msgTemplates["trust_link"])
msg.ReplyMarkup = optionKeyboard
bot.Send(msg)
updateDb.dialog_status = 3
updateDb.dialog_status = 5
userDatabase[update.Message.From.ID] = updateDb
} else if update.Message.Text == "KARMA" {
msg := tgbotapi.NewMessage(userDatabase[update.Message.From.ID].tgid, msgTemplates["karma"])
} else if update.Message.Text == "See who trust/untrust user" {
msg := tgbotapi.NewMessage(userDatabase[update.Message.From.ID].tgid, msgTemplates["who_trust"])
msg.ReplyMarkup = optionKeyboard
bot.Send(msg)
updateDb.dialog_status = 4
updateDb.dialog_status = 6
userDatabase[update.Message.From.ID] = updateDb
}
}

// generate link
case 5:
if updateDb, ok := userDatabase[update.Message.From.ID]; ok {
msg := tgbotapi.NewMessage(userDatabase[update.Message.From.ID].tgid, "this functionality is not yet implemented")
bot.Send(msg)
updateDb.dialog_status = 2
userDatabase[update.Message.From.ID] = updateDb
//my_tg_id := userDatabase[update.Message.From.ID].tgid
//to_id := tgbotapi.

}

// see trusters
case 6:
if updateDb, ok := userDatabase[update.Message.From.ID]; ok {
msg := tgbotapi.NewMessage(userDatabase[update.Message.From.ID].tgid, "this functionality is not yet implemented")
bot.Send(msg)
updateDb.dialog_status = 2
userDatabase[update.Message.From.ID] = updateDb
}
}
}
}
Expand Down

0 comments on commit 66e1729

Please sign in to comment.