MCPcopy
hub / github.com/EverythingSuckz/TG-FileStreamBot / AddDefaultClient

Method AddDefaultClient

internal/bot/workers.go:48–60  ·  view source on GitHub ↗
(client *gotgproto.Client, self *tg.User)

Source from the content-addressed store, hash-verified

46}
47
48func (w *BotWorkers) AddDefaultClient(client *gotgproto.Client, self *tg.User) {
49 if w.Bots == nil {
50 w.Bots = make([]*Worker, 0)
51 }
52 w.incStarting()
53 w.Bots = append(w.Bots, &Worker{
54 Client: client,
55 ID: w.starting,
56 Self: self,
57 log: w.log,
58 })
59 w.log.Sugar().Info("Default bot loaded")
60}
61
62func (w *BotWorkers) incStarting() {
63 w.mut.Lock()

Callers 1

runAppFunction · 0.80

Calls 1

incStartingMethod · 0.95

Tested by

no test coverage detected