From 66e17298a5c766c70ee2a4d1766b131d6671d64f Mon Sep 17 00:00:00 2001 From: Bekket Date: Thu, 20 Oct 2022 16:37:29 +0400 Subject: [PATCH] upd --- main.go | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index 6315fd6..34f7093 100644 --- a/main.go +++ b/main.go @@ -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 + } } } }