bot

package
v0.0.0-...-a992749 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Avatar      string `json:"avatar,omitempty"`
	// contains filtered or unexported fields
}

func New

func New(name string) (*Bot, error)

func (*Bot) SetAvatar

func (b *Bot) SetAvatar(avatar string) error

func (*Bot) SetDescription

func (b *Bot) SetDescription(descr string) error

func (*Bot) SetName

func (b *Bot) SetName(name string) error

type Command

type Command struct {
	Id          string `json:"id"`
	BotId       string `json:"botId"`
	Alias       string `json:"alias"`
	Description string `json:"description,omitempty"`
}

func NewCommand

func NewCommand(botId, alias, descr string) (*Command, error)

type Key

type Key struct {
	BotId string
	Token string
	// contains filtered or unexported fields
}

func NewKey

func NewKey(botId, token string) (*Key, error)

func (*Key) Assemble

func (k *Key) Assemble() string

func (*Key) SetToken

func (k *Key) SetToken(token string) error

type Webhook

type Webhook struct {
	BotId  string `json:"botId"`
	Url    string `json:"url"`
	Secret string `json:"secret,omitempty"`
	// contains filtered or unexported fields
}

func NewWebhook

func NewWebhook(botId, url, secret string) (*Webhook, error)

func (*Webhook) SetSecret

func (w *Webhook) SetSecret(secret string) error

func (*Webhook) SetUrl

func (w *Webhook) SetUrl(url string) error

Jump to

Keyboard shortcuts

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