Documentation
¶
Index ¶
Constants ¶
View Source
const (
Intents = 1535
)
Variables ¶
View Source
var Handlers = []interface{}{ func(session *discordgo.Session, interactionCreate *discordgo.InteractionCreate) { switch interactionCreate.Type { case discordgo.InteractionApplicationCommand: handler, exists := interactions.CommandHandlers[interactionCreate.ApplicationCommandData().Name] if !exists { interactions.InteractionRespondError(session, interactionCreate.Interaction, "Команда не найдена. Свяжитесь с администрацией.") return } handler(session, interactionCreate) case discordgo.InteractionMessageComponent: customID := strings.Split(interactionCreate.MessageComponentData().CustomID, ":")[0] handler, exists := interactions.ComponentHandlers[customID] if !exists { interactions.InteractionRespondError(session, interactionCreate.Interaction, "Команда не найдена. Свяжитесь с администрацией.") return } handler(session, interactionCreate) } }, func(session *discordgo.Session, guildMemberRemove *discordgo.GuildMemberRemove) { err := db.RemoveUser(guildMemberRemove.User.ID) if err != nil { fmt.Printf("Error removing user: %v", err) } }, }
Functions ¶
func AddHandlers ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.