INNER CODE UNIT · Go

init

instead-hub/instead · src/tiny/ifbot/discord-bot/main.go:22

func init() {

	flag.StringVar(&Token, "t", "", "Bot Token")
	flag.StringVar(&Channels, "c", "", "Channels")
	flag.Parse()
}

func main() {
	ChannelsList = strings.Split(Channels, ",")

	ifbot.SaveDir = "discord-saves/"
	// Create a new Discord session using the provided bot token.
	dg, err := discordgo.New("Bot " + Token)
	if err != nil {
		fmt.Println("error creating Discord session,", err)
		return
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…