haccerinteractions

package module
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 9 Imported by: 0

README

Haccerinteractions

Welcome to Haccerinteractions, a package for advanced selfbotters

Haccerinteractions is a package that expands the selfbotting capabilities of discordgo by giving you the ability to run slash commands, get their output, and interact with message components like buttons.

Getting started

After installing and importing Haccerinteractions, follow these steps.

Create a new discordgo session

Because Haccerinteractions is powered by discordgo, you first need to make a session with this code:

session,_:=discordgo.New("insert_token_here")
Create a Haccerinteractions runner

This will be the thing that runs commands and clicks buttons. Use this code to make a runner:

runner:=haccerinteractions.NewRunner(session)

This will configure required parameters within your session as well as opening a gateway connection.

Get commands

You first must get commands for a channel with this code:

// You can leave the application/bot id empty.
// The limit is ignored when the bot_id is set, however
commands,err:=runner.GuildChannelGetSlashCommands("channel_id_here",10,"bot_id_here")
Run Commands
// Run a command.
// Set arguments to nil to pass no arguments
responseMessage,err:=runner.GuildChannelRunCommand(commands[0],nil,"channel_id_here")
Interact with components
// You can interact with various components by using different request data structs
button:=responseMessage.Components[0].(*discordgo.ActionsRow).Components[0].(*discordgo.Button)
runner.GuildChannelComponentRequest("channel_id_here",responseMessage.ID,"bot_id_here",button.CustomID,haccerinteractions.ButtonClickRequestData{})

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRunner

func NewRunner(s *discordgo.Session) haccerInteractionsRunner

Create a command runner

Types

type Application added in v1.3.0

type Application struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	BotID       string `json:"bot_id"`
}

type ButtonClickRequestData

type ButtonClickRequestData struct{}

type Command

type Command struct {
	Type                 int             `json:"type"`
	ID                   string          `json:"id"`
	ApplicationID        string          `json:"application_id"`
	Name                 string          `json:"name"`
	Version              string          `json:"version"`
	Options              []CommandOption `json:"options"`
	IntegrationTypes     []int           `json:"integration_types"`
	GlobalPopularityRank int             `json:"global_popularity_rank"`
}

type CommandOption

type CommandOption struct {
	Type int    `json:"type"`
	Name string `json:"name"`
}

type CommandRunOption

type CommandRunOption struct {
	Type    int                `json:"type"`
	Name    string             `json:"name"`
	Value   string             `json:"value"`
	Options []CommandRunOption `json:"options"`
}

type CommandSearchResponse

type CommandSearchResponse struct {
	Commands     []Command     `json:"application_commands"`
	Applications []Application `json:"applications"`
}

type ComponentInteractRequest

type ComponentInteractRequest struct {
	Type      discordgo.InteractionType `json:"type"`
	Flags     int                       `json:"message_flags"`
	SessionID string                    `json:"session_id"`
	Nonce     string                    `json:"nonce"`
	GuildID   string                    `json:"guild_id"`
	ChannelID string                    `json:"channel_id"`
	MessageID string                    `json:"message_id"`
	BotID     string                    `json:"application_id"`
	Data      interface{}               `json:"data"`
}

type GuildChannel

type GuildChannel struct {
	GuildID   string
	ChannelID string
}

type SelectMenuSelectRequestData

type SelectMenuSelectRequestData struct {
	Type   discordgo.SelectMenuType `json:"type"`
	Values []string                 `json:"values"`
}

Jump to

Keyboard shortcuts

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