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

Function generateSession

cmd/fsb/session.go:26–37  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

24}
25
26func generateSession(cmd *cobra.Command, args []string) {
27 loginType, _ := cmd.Flags().GetString("login-type")
28 apiId, _ := cmd.Flags().GetInt32("api-id")
29 apiHash, _ := cmd.Flags().GetString("api-hash")
30 if loginType == "qr" {
31 qrlogin.GenerateQRSession(int(apiId), apiHash)
32 } else if loginType == "phone" {
33 generatePhoneSession()
34 } else {
35 fmt.Println("Invalid login type. Please use either 'qr' or 'phone'")
36 }
37}
38
39func generatePhoneSession() {
40 fmt.Println("Phone session is not implemented yet.")

Callers

nothing calls this directly

Calls 2

GenerateQRSessionFunction · 0.92
generatePhoneSessionFunction · 0.85

Tested by

no test coverage detected