backend

package
v0.0.0-...-73af561 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: AGPL-3.0, AGPL-3.0-or-later Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DiscordToken string `json:"discord-token"`
	Account      int64  `json:"account"`
	Method       string `json:"login-method"`
	Password     string `json:"password"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(log *logrus.Logger, data *ServiceData) (*Service, error)

func (*Service) DeleteALlChannel

func (s *Service) DeleteALlChannel(guildId string) error

func (*Service) Discord

func (s *Service) Discord() *discordgo.Session

func (*Service) HandleDiscordMessage

func (s *Service) HandleDiscordMessage(group *client.GroupInfo, discordMsg *discordgo.MessageCreate)

func (*Service) Logger

func (s *Service) Logger() *logrus.Logger

func (*Service) QQ

func (s *Service) QQ() *bot.Bot

func (*Service) QQMsgToString

func (s *Service) QQMsgToString(msg *message.GroupMessage, isReply bool) string

func (*Service) Start

func (s *Service) Start(guildId string) error

func (*Service) Stop

func (s *Service) Stop() error

type ServiceData

type ServiceData struct {
	HandleQrCode   func(*qrcode.Matrix)
	HandleCaptcha  func([]byte) string
	ReceiveSMSCode func() string
	Config         *Config
}

Jump to

Keyboard shortcuts

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