basic

package
v0.0.0-...-f5483da Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: Zlib Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorNoArguments = APIError{
	Service: "bot",
	Method:  "no_enough_arguments",
	Code:    1,
}

ErrorNoArguments описывает ошибку недостатка аргументов

Functions

func Check

func Check(err error, die ...bool)

Check обработка исключений

Types

type APIError

type APIError struct {
	Service string
	Method  string
	Code    int
}

APIError описывает ошибку API

func GenerateAPIError

func GenerateAPIError(resp []byte) APIError

GenerateAPIError генерирует basic.APIError из JSON-представления

type Plugin

type Plugin struct {
	Cmds      []string
	Desc      string
	Data      *fastjson.Value
	Config    *fastjson.Value
	ConfigPos string
	VK        *vkapi.VK
	DB        *sql.DB
	Values    struct {
		Args   []string
		PeerID int64
		FromID int64
	}
}

Plugin описывает плагин

Jump to

Keyboard shortcuts

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