peer-resolution

command
v1.0.0-beta25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package main demonstrates GoTG's automatic peer resolution.

GoTG resolves peers automatically in two ways:

  1. Implicit resolution — pass a chatID to SendMessage/SendMedia and the framework resolves it to an InputPeer via a 3-tier lookup (cache → DB → RPC). You never construct InputPeer yourself.

  2. Explicit resolution — call ResolvePeerToID with a human-readable identifier (@username, +phone, or numeric ID string) to get a chatID, then pass it to any send method.

This example shows both patterns.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL