Documentation
¶
Index ¶
Constants ¶
View Source
const (
ApplicationCommandChat string = "chat"
)
View Source
const (
MaxMessageLength int = 2000
)
Variables ¶
This section is empty.
Functions ¶
func IsWordDivider ¶ added in v0.2.5
IsWordDivider returns true if the rune is a word divider.(Currently only space is considered a word divider)
func SendMessageByChunk ¶
Types ¶
type DiscordHandler ¶
type DiscordHandler struct {
// contains filtered or unexported fields
}
func NewDiscordHandler ¶
func NewDiscordHandler(chatGPT provider.ChatGPTService) *DiscordHandler
func (*DiscordHandler) GetInteractionCreateHandler ¶
func (h *DiscordHandler) GetInteractionCreateHandler() func(s *discordgo.Session, i *discordgo.InteractionCreate)
func (*DiscordHandler) GetMessageCreateHandler ¶
func (h *DiscordHandler) GetMessageCreateHandler() func(s *discordgo.Session, m *discordgo.MessageCreate)
GetMessageCreateHandler This function will be called (due to AddHandler above) every time a new message is created on any channel that the authenticated bot has access to.
It is called whenever a message is created but only when it's sent through a server as we did not request IntentsDirectMessages.
Click to show internal directories.
Click to hide internal directories.