ds

package
v0.0.0-...-617252f Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppContext

type AppContext struct {
	LogFilePath    string `yaml:"logFilePath"`
	ApplicationId  string `yaml:"applicationId"`
	GuildId        string `yaml:"guildId"`
	BotName        string `yaml:"botName"`
	BotToken       string `yaml:"botToken"`
	DifyToken      string `yaml:"difyToken"`
	ClearCmd       string `yaml:"clearCmd"`
	ClearCmdDesc   string `yaml:"clearCmdDesc"`
	ClearDelimiter string `yaml:"clearDelimiter"`
	FreeChatLimit  int    `yaml:"creeChatLimit"`
	OnAt           bool   `yaml:"onAt"`
	BotId          string
	ConfigFilePath string
}

type ChatMessage

type ChatMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

type Stack

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

func NewStack

func NewStack() *Stack

func (*Stack) GetBottomElement

func (s *Stack) GetBottomElement() (*discordgo.Message, error)

GetBottomElement returns the bottom element of the stack

func (*Stack) IsEmpty

func (s *Stack) IsEmpty() bool

func (*Stack) Pop

func (s *Stack) Pop() (*discordgo.Message, error)

func (*Stack) Push

func (s *Stack) Push(element *discordgo.Message)

func (*Stack) Size

func (s *Stack) Size() int

type Token

type Token struct {
	Discord string
	Dify    string
}

Token is the token for the discord bot and chatgpt

type UserSession

type UserSession struct {
	UserChannelID  string //UserSession's unique key
	UserId         string
	ChannelID      string
	UserName       string
	ConversationID string
	ChatCount      int //Number of messages sent by the user
}

UserSession Each user holds a session in each channel to save its state

Jump to

Keyboard shortcuts

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