fix: publish

This commit is contained in:
Rogee
2024-09-04 13:29:15 +08:00
parent 3f6656d97e
commit d7c9d40e37
5 changed files with 29 additions and 7 deletions

View File

@@ -2,6 +2,9 @@ package internal
import (
"context"
"fmt"
"exporter/config"
"github.com/gotd/td/tg"
"github.com/pkg/errors"
@@ -18,7 +21,12 @@ func ExportCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "export",
Short: "export channels",
RunE: wrapE(exportCmd),
PreRunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("init client")
defer fmt.Println("init client done")
return InitClient(config.C)
},
RunE: wrapE(exportCmd),
}
cmd.Flags().Int64Var(&channelID, "channel", 0, "channel id")