diff options
| author | s <[email protected]> | 2025-11-25 09:38:31 -0500 |
|---|---|---|
| committer | s <[email protected]> | 2025-11-25 09:38:31 -0500 |
| commit | 8472267b60b204cea5fbdeaf8fe06443822d1bfb (patch) | |
| tree | eba71104733067072ded109bf96904cd825c2f7f /internal/formatter/telegram.go | |
| parent | bc31d9cc8f93a5efef958872f48f3f4370ed5e29 (diff) | |
| download | dborg-8472267b60b204cea5fbdeaf8fe06443822d1bfb.tar.gz dborg-8472267b60b204cea5fbdeaf8fe06443822d1bfb.zip | |
feat: add crypto analysis, email verification, and telegram lookup commands
Diffstat (limited to 'internal/formatter/telegram.go')
| -rw-r--r-- | internal/formatter/telegram.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/internal/formatter/telegram.go b/internal/formatter/telegram.go new file mode 100644 index 0000000..7491c66 --- /dev/null +++ b/internal/formatter/telegram.go @@ -0,0 +1,34 @@ +package formatter + +import ( + "fmt" + "git.db.org.ai/dborg/internal/models" + "git.db.org.ai/dborg/internal/utils" +) + +func FormatTelegramResults(response *models.TelegramPhoneResponse, asJSON bool) error { + if asJSON { + return utils.PrintJSON(response) + } + + PrintSection(fmt.Sprintf("📱 Telegram Phone Lookup")) + + fmt.Printf("%s: %s\n", Cyan("Identifier"), response.Identifier) + + if response.PhoneNumber != "" { + fmt.Printf("%s: %s\n", Cyan("Phone Number"), Green(response.PhoneNumber)) + } else { + fmt.Printf("%s: %s\n", Cyan("Phone Number"), Red("Not found")) + } + + fmt.Println() + PrintDivider() + fmt.Printf("%s: ", Cyan("Credits Remaining")) + if response.Credits.Unlimited { + fmt.Printf("%s\n", Green("Unlimited")) + } else { + fmt.Printf("%s\n", FormatCredits(int64(response.Credits.Remaining))) + } + + return nil +} |
