tcct

package
v0.0.0-...-cc97a04 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "0.2.2"
)

Variables

View Source
var (
	// Global variable
	Tbot                                 = NewBot()
	Name, Server, Api_key, Channel, Port = GetConfig()
)

This will need to be re-written when we'll support multiple channel connections i guess :p

Functions

func GetBuffView

func GetBuffView(g *gocui.Gui) (string, error)

func GetConfig

func GetConfig() (string, string, string, string, string)

func Layout

func Layout(g *gocui.Gui) error

func Quit

func Quit(g *gocui.Gui, v *gocui.View) error

func SendMessage

func SendMessage(b *Bot, msg string)

func SetView

func SetView(g *gocui.Gui, name string) (*gocui.View, error)

func SpamLine

func SpamLine(c string, times int) string

func UpdateChat

func UpdateChat(g *gocui.Gui, msg string)

func UpdateView

func UpdateView(g *gocui.Gui, v *gocui.View) error

Types

type Bot

type Bot struct {
	// The basic bot structure
	Name    string
	Server  string
	Api_key string
	Channel string
	Port    string
	Conn    net.Conn
}

func NewBot

func NewBot() *Bot

func (*Bot) Connect

func (bot *Bot) Connect()

func (*Bot) Message

func (bot *Bot) Message(msg string)

type Config

type Config struct {
	// Basic config structure
	Name    string
	Server  string
	Api_key string
	Channel string
	Port    string
}

Jump to

Keyboard shortcuts

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