types

package
v0.0.0-...-84f1622 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfig

type ApiConfig struct {
	MainServer          string `json:"main_server" description:"The ID of the main Anti-Raid Discord Server" validate:"required"`
	SupportServerInvite string `json:"support_server_invite" comment:"Discord Support Server Link" default:"https://discord.gg/u78NFAXm" validate:"required"`
	ClientID            string `json:"client_id" description:"The ID of the Anti-Raid bot client" validate:"required"`
}

API configuration data

type ApiError

type ApiError struct {
	Context map[string]string `json:"context,omitempty" description:"Context of the error. Usually used for validation error contexts"`
	Message string            `json:"message" description:"Message of the error"`
}

This represents a IBL Popplio API Error

type AuthorizeRequest

type AuthorizeRequest struct {
	Code        string `json:"code" validate:"required,min=5"`
	RedirectURI string `json:"redirect_uri" validate:"required"`
	Protocol    string `` /* 144-byte string literal not displayed */
	Scope       string `json:"scope" validate:"required,oneof=normal ban_exempt"`
}

type BotState

type BotState struct {
	Commands []discordgo.ApplicationCommand `json:"commands"`
}

type CreateUserSession

type CreateUserSession struct {
	Name   string `json:"name" validate:"required" description:"The name of the session"`
	Type   string `json:"type" validate:"oneof=api" description:"The type of session token. Must be 'api'"`
	Expiry int64  `json:"expiry" validate:"required" description:"The time in seconds the session will last"`
}

type CreateUserSessionResponse

type CreateUserSessionResponse struct {
	UserID    string       `json:"user_id" description:"The ID of the user who created the session"`
	Token     string       `json:"token" description:"The token of the session"`
	SessionID string       `json:"session_id" description:"The ID of the session"`
	Expiry    time.Time    `json:"expiry" description:"The time the session expires"`
	User      *PartialUser `json:"user,omitempty" description:"The user who created the session (only sent on OAuth2 login)"`
}

type DashboardGuild

type DashboardGuild struct {
	ID          string `json:"id" description:"The ID of the guild"`
	Name        string `json:"name" description:"The name of the guild"`
	Avatar      string `json:"avatar" description:"The avatar url of the guild"`
	Permissions int64  `json:"permissions" description:"The permissions the user has in the guild"`
}

type DashboardGuildData

type DashboardGuildData struct {
	Guilds        []*DashboardGuild `json:"guilds" description:"The guilds the user is in"`
	BotInGuilds   []string          `json:"has_bot" description:"A list of guild IDs that the user has the bot in"`
	UnknownGuilds []string          `json:"unknown_guilds" description:"A list of guild IDs where the bot is in an outage etc. in"`
}

type DispatchResult

type DispatchResult struct {
	Type string `json:"type" description:"The type of the dispatch result [Ok or Err]"`
	Data any    `json:"data" description:"The data of the dispatch result"`
}

type GetStatusResponse

type GetStatusResponse struct {
	Resp        StatusEndpointResponse `json:"resp"`
	ShardConns  map[int64]ShardConn    `json:"shard_conns"`
	TotalGuilds int64                  `json:"total_guilds"`
}

type GuildChannelWithPermissions

type GuildChannelWithPermissions struct {
	User    Permissions        `json:"user" description:"The permissions the user has in the channel"`
	Bot     Permissions        `json:"bot" description:"The permissions the bot has in the channel"`
	Channel *discordgo.Channel `json:"channel" description:"The channel object"`
}

type PartialUser

type PartialUser struct {
	ID         string `json:"id" description:"The ID of the user"`
	Username   string `json:"username" description:"The username of the user"`
	GlobalName string `json:"global_name,omitempty" description:"The global name of the user, if set"`
	Avatar     string `json:"avatar,omitempty" description:"The avatar hash of the user, if set"`
}

type Permissions

type Permissions string

type Resp

type Resp struct {
	Ok   bool                    `json:"ok"`
	Data *StatusEndpointResponse `json:"data"`
}

type SerenityRole

type SerenityRole struct {
	ID           string            `json:"id" description:"The ID of the role"`
	GuildID      string            `json:"guild_id" description:"The ID of the guild"`
	Color        int               `json:"color" description:"The color of the role"`
	Name         string            `json:"name" description:"The name of the role"`
	Permissions  *Permissions      `json:"permissions" description:"The permissions of the role"`
	Position     int16             `json:"position" description:"The position of the role"`
	Tags         *SerenityRoleTags `json:"tags" description:"The tags of the role"`
	Icon         *string           `json:"icon" description:"The icon of the role"`
	UnicodeEmoji string            `json:"unicode_emoji" description:"The unicode emoji of the role"`
}

type SerenityRoleTags

type SerenityRoleTags struct {
	BotID                 *string `json:"bot_id" description:"The ID of the bot the role belongs to"`
	IntegrationID         *string `json:"integration_id" description:"The ID of the integration the role belongs to"`
	PremiumSubscriber     bool    `json:"premium_subscriber" description:"Whether this is the guild's premium subscriber role"`
	SubscriptionListingID *string `json:"subscription_listing_id" description:"The id of this role's subscription sku and listing"`
	AvailableForPurchase  bool    `json:"available_for_purchase" description:"Whether this role is available for purchase"`
	GuildConnections      bool    `json:"guild_connections" description:"Whether this role is a guild's linked role"`
}

type SettingsExecute

type SettingsExecute struct {
	Operation string `json:"operation" description:"The operation type to execute"`
	Setting   string `json:"setting" description:"The name of the setting"`
	Fields    any    `json:"fields" description:"The fields to execute the operation with"`
}

SettingsExecute allows execution of a settings operation

type ShardConn

type ShardConn struct {
	Status      string `json:"status"`
	RealLatency int64  `json:"real_latency"`
	Guilds      int64  `json:"guilds"`
	Uptime      int64  `json:"uptime"`
	TotalUptime int64  `json:"total_uptime"`
}

type ShardGroup

type ShardGroup struct {
	Shards [][]int64 `json:"shards"`
}

type StatusEndpointManager

type StatusEndpointManager struct {
	DisplayName string       `json:"display_name"`
	ShardGroups []ShardGroup `json:"shard_groups"`
}

type StatusEndpointResponse

type StatusEndpointResponse struct {
	Uptime   int64                   `json:"uptime"`
	Managers []StatusEndpointManager `json:"managers"`
}

type TemplateShopPartialTemplate

type TemplateShopPartialTemplate struct {
	ID            string    `db:"id" json:"id" description:"The ID of the template"`
	Name          string    `db:"name" json:"name" description:"The name of the template"`
	Version       string    `db:"version" json:"version" description:"The version of the template"`
	Description   string    `db:"description" json:"description" description:"The description of the template"`
	OwnerGuild    string    `db:"owner_guild" json:"owner_guild" description:"The ID of the guild that owns the template"`
	CreatedAt     time.Time `db:"created_at" json:"created_at" description:"The time the template was created"`
	LastUpdatedAt time.Time `db:"last_updated_at" json:"last_updated_at" description:"The time the template was last updated"`
	FriendlyName  string    `db:"friendly_name" json:"friendly_name" description:"The friendly name of the template"`
	Events        []string  `db:"events" json:"events" description:"The events the template listens to"`
	Language      string    `db:"language" json:"language" description:"The language of the template"`
	AllowedCaps   []string  `db:"allowed_caps" json:"allowed_caps" description:"The allowed capabilities of the template"`
	Tags          []string  `db:"tags" json:"tags" description:"The tags of the template"`
}

Sent on List Template Shop Templates

type TemplateShopTemplate

type TemplateShopTemplate struct {
	ID            string            `db:"id" json:"id" description:"The ID of the template"`
	Name          string            `db:"name" json:"name" description:"The name of the template"`
	Version       string            `db:"version" json:"version" description:"The version of the template"`
	Description   string            `db:"description" json:"description" description:"The description of the template"`
	OwnerGuild    string            `db:"owner_guild" json:"owner_guild" description:"The ID of the guild that owns the template"`
	CreatedAt     time.Time         `db:"created_at" json:"created_at" description:"The time the template was created"`
	LastUpdatedAt time.Time         `db:"last_updated_at" json:"last_updated_at" description:"The time the template was last updated"`
	FriendlyName  string            `db:"friendly_name" json:"friendly_name" description:"The friendly name of the template"`
	Events        []string          `db:"events" json:"events" description:"The events the template listens to"`
	Language      string            `db:"language" json:"language" description:"The language of the template"`
	AllowedCaps   []string          `db:"allowed_caps" json:"allowed_caps" description:"The allowed capabilities of the template"`
	Content       map[string]string `db:"content" json:"content" description:"The content of the template"`
	Tags          []string          `db:"tags" json:"tags" description:"The tags of the template"`
}

TemplateShopTemplate is the full template data sent on Get Template Shop Template It includes the content of the template, which is not included in the partial template

type TestAuth

type TestAuth struct {
	AuthType string `json:"auth_type"`
	TargetID string `json:"target_id"`
	Token    string `json:"token"`
}

type User

type User struct {
	User       *dovetypes.PlatformUser `json:"user" description:"The user object of the user"`
	State      string                  `db:"state" json:"state" description:"The state of the user"`
	VoteBanned bool                    `db:"vote_banned" json:"vote_banned" description:"Whether or not the user is banned from recieving rewards from voting"`
	CreatedAt  time.Time               `db:"created_at" json:"created_at" description:"The time the user was created"`
	UpdatedAt  time.Time               `db:"updated_at" json:"updated_at" description:"The time the user was last updated"`
}

Represents a user on Antiraid

type UserGuildBaseData

type UserGuildBaseData struct {
	OwnerID   string                        `json:"owner_id" description:"The ID of the guild owner"`
	Name      string                        `json:"name" description:"The name of the guild"`
	Icon      *string                       `json:"icon" description:"The icon of the guild"`
	Roles     []SerenityRole                `json:"roles" description:"The roles of the guild"`
	UserRoles []string                      `json:"user_roles" description:"The role IDs the user has in the guild"`
	BotRoles  []string                      `json:"bot_roles" description:"The role IDs the bot has in the guild"`
	Channels  []GuildChannelWithPermissions `json:"channels" description:"The channels of the guild with permission info"`
}

type UserSession

type UserSession struct {
	ID        string    `db:"id" json:"id" description:"The ID of the session"`
	Name      *string   `db:"name" json:"name,omitempty" description:"The name of the session. Login sessions do not have any names by default"`
	UserID    string    `db:"user_id" json:"user_id" description:"The users ID"`
	CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time the session was created"`
	Type      string    `db:"type" json:"type" description:"The type of session token"`
	Expiry    time.Time `db:"expiry" json:"expiry" description:"The time the session expires"`
}

type UserSessionList

type UserSessionList struct {
	Sessions []*UserSession `json:"sessions" description:"The list of sessions"`
}

Jump to

Keyboard shortcuts

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