event

package
v0.0.0-...-9e75793 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationCommandPermissionsUpdate

type ApplicationCommandPermissionsUpdate struct {
	Data *discord.GuildApplicationCommandPermissions `json:"d"`
}

func NewApplicationCommandPermissionsUpdate

func NewApplicationCommandPermissionsUpdate(rest *rest.Client, data []byte) (*ApplicationCommandPermissionsUpdate, error)

type AutoModerationActionExecution

type AutoModerationActionExecution struct {
	Data *discord.AutoModerationActionExecutionEventFields `json:"d"`
}

func NewAutoModerationActionExecution

func NewAutoModerationActionExecution(rest *rest.Client, data []byte) (*AutoModerationActionExecution, error)

type AutoModerationRuleCreate

type AutoModerationRuleCreate struct {
	Data *discord.AutoModerationRule `json:"d"`
}

func NewAutoModerationRuleCreate

func NewAutoModerationRuleCreate(rest *rest.Client, data []byte) (*AutoModerationRuleCreate, error)

type AutoModerationRuleDelete

type AutoModerationRuleDelete struct {
	Data *discord.AutoModerationRule `json:"d"`
}

func NewAutoModerationRuleDelete

func NewAutoModerationRuleDelete(rest *rest.Client, data []byte) (*AutoModerationRuleDelete, error)

type AutoModerationRuleUpdate

type AutoModerationRuleUpdate struct {
	Data *discord.AutoModerationRule `json:"d"`
}

func NewAutoModerationRuleUpdate

func NewAutoModerationRuleUpdate(rest *rest.Client, data []byte) (*AutoModerationRuleUpdate, error)

type ChannelCreate

type ChannelCreate struct {
	Data *discord.Channel `json:"d"`
}

func NewChannelCreate

func NewChannelCreate(rest *rest.Client, data []byte) (*ChannelCreate, error)

type ChannelDelete

type ChannelDelete struct {
	Data *discord.Channel `json:"d"`
}

func NewChannelDelete

func NewChannelDelete(rest *rest.Client, data []byte) (*ChannelDelete, error)

type ChannelPinsUpdate

type ChannelPinsUpdate struct {
	Data *discord.ChannelPinsUpdateEventFields `json:"d"`
}

func NewChannelPinsUpdate

func NewChannelPinsUpdate(rest *rest.Client, data []byte) (*ChannelPinsUpdate, error)

type ChannelUpdate

type ChannelUpdate struct {
	Data *discord.Channel `json:"d"`
}

func NewChannelUpdate

func NewChannelUpdate(rest *rest.Client, data []byte) (*ChannelUpdate, error)

type ClientStatus

type ClientStatus struct {
	Desktop string `json:"deskop,omitempty"` // windows, linux, mac
	Mobile  string `json:"mobile,omitempty"` // ios, android
	Web     string `json:"web,omitempty"`    // browser, bot_account
}

type EventType

type EventType string
const (
	EventReady                               EventType = "READY"
	EventResumed                             EventType = "RESUMED"
	EventApplicationCommandPermissionsUpdate EventType = "APPLICATION_COMMAND_PERMISSIONS_UPDATE"
	EventAutoModerationRuleCreate            EventType = "AUTO_MODERATION_RULE_CREATE"
	EventAutoModerationRuleUpdate            EventType = "AUTO_MODERATION_RULE_UPDATE"
	EventAutoModerationRuleDelete            EventType = "AUTO_MODERATION_RULE_DELETE"
	EventAutoModerationActionExecution       EventType = "AUTO_MODERATION_ACTION_EXECUTION"
	EventChannelCreate                       EventType = "CHANNEL_CREATE"
	EventChannelUpdate                       EventType = "CHANNEL_UPDATE"
	EventChannelDelete                       EventType = "CHANNEL_DELETE"
	EventChannelPinsUpdate                   EventType = "CHANNEL_PINS_UPDATE"
	EventThreadCreate                        EventType = "THREAD_CREATE"
	EventThreadUpdate                        EventType = "THREAD_UPDATE"
	EventThreadDelete                        EventType = "THREAD_DELETE"
	EventThreadListSync                      EventType = "THREAD_LIST_SYNC"
	EventThreadMemberUpdate                  EventType = "THREAD_MEMBER_UPDATE"
	EventThreadMembersUpdate                 EventType = "THREAD_MEMBERS_UPDATE"
	EventGuildCreate                         EventType = "GUILD_CREATE"
	EventGuildUpdate                         EventType = "GUILD_UPDATE"
	EventGuildDelete                         EventType = "GUILD_DELETE"
	EventGuildBanAdd                         EventType = "GUILD_BAN_ADD"
	EventGuildBanRemove                      EventType = "GUILD_BAN_REMOVE"
	EventGuildEmojisUpdate                   EventType = "GUILD_EMOJIS_UPDATE"
	EventGuildStickersUpdate                 EventType = "GUILD_STICKERS_UPDATE" // TGM KHIROO
	EventGuildIntegrationsUpdate             EventType = "GUILD_INTEGRATIONS_UPDATE"
	EventGuildMemberAdd                      EventType = "GUILD_MEMBER_ADD"
	EventGuildMemberRemove                   EventType = "GUILD_MEMBER_REMOVE"
	EventGuildMemberUpdate                   EventType = "GUILD_MEMBER_UPDATE"
	EventGuildMembersChunk                   EventType = "GUILD_MEMBERS_CHUNK"
	EventGuildRoleCreate                     EventType = "GUILD_ROLE_CREATE"
	EventGuildRoleUpdate                     EventType = "GUILD_ROLE_UPDATE"
	EventGuildRoleDelete                     EventType = "GUILD_ROLE_DELETE"
	EventGuildScheduledEventCreate           EventType = "GUILD_SCHEDULED_EVENT_CREATE"
	EventGuildScheduledEventUpdate           EventType = "GUILD_SCHEDULED_EVENT_UPDATE"
	EventGuildScheduledEventDelete           EventType = "GUILD_SCHEDULED_EVENT_DELETE"
	EventGuildScheduledEventUserAdd          EventType = "GUILD_SCHEDULED_EVENT_USER_ADD"
	EventGuildScheduledEventUserRemove       EventType = "GUILD_SCHEDULED_EVENT_USER_REMOVE"
	EventIntegrationCreate                   EventType = "INTEGRATION_CREATE"
	EventIntegrationUpdate                   EventType = "INTEGRATION_UPDATE"
	EventIntegrationDelete                   EventType = "INTEGRATION_DELETE"
	EventInteractionCreate                   EventType = "INTERACTION_CREATE"
	EventInviteCreate                        EventType = "INVITE_CREATE"
	EventInviteDelete                        EventType = "INVITE_DELETE"
	EventMessageCreate                       EventType = "MESSAGE_CREATE"
	EventMessageUpdate                       EventType = "MESSAGE_UPDATE"
	EventMessageDelete                       EventType = "MESSAGE_DELETE"
	EventMessageDeleteBulk                   EventType = "MESSAGE_DELETE_BULK"
	EventMessageReactionAdd                  EventType = "MESSAGE_REACTION_ADD"
	EventMessageReactionRemove               EventType = "MESSAGE_REACTION_REMOVE"
	EventMessageReactionRemoveAll            EventType = "MESSAGE_REACTION_REMOVE_ALL"
	EventMessageReactionRemoveEmoji          EventType = "MESSAGE_REACTION_REMOVE_EMOJI"
	EventPresenceUpdate                      EventType = "PRESENCE_UPDATE"
	EventStageInstanceCreate                 EventType = "STAGE_INSTANCE_CREATE"
	EventStageInstanceUpdate                 EventType = "STAGE_INSTANCE_UPDATE"
	EventStageInstanceDelete                 EventType = "STAGE_INSTANCE_DELETE"
	EventTypingStart                         EventType = "TYPING_START"
	EventUserUpdate                          EventType = "USER_UPDATE"
	EventVoiceStateUpdate                    EventType = "VOICE_STATE_UPDATE"
	EventVoiceServerUpdate                   EventType = "VOICE_SERVER_UPDATE"
	EventWebhooksUpdate                      EventType = "WEBHOOKS_UPDATE"
)

func (EventType) String

func (t EventType) String() string

type GuildBanAdd

type GuildBanAdd struct {
	Data struct {
		GuildId string        `json:"guild_id"`
		User    *discord.User `json:"user"`
	} `json:"d"`
}

func NewGuildBanAdd

func NewGuildBanAdd(rest *rest.Client, data []byte) (*GuildBanAdd, error)

type GuildBanRemove

type GuildBanRemove struct {
	Data struct {
		GuildId string        `json:"guild_id"`
		User    *discord.User `json:"user"`
	} `json:"d"`
}

func NewGuildBanRemove

func NewGuildBanRemove(rest *rest.Client, data []byte) (*GuildBanRemove, error)

type GuildCreate

type GuildCreate struct {
	Data *discord.Guild `json:"d"`
}

func NewGuildCreate

func NewGuildCreate(rest *rest.Client, data []byte) (*GuildCreate, error)

type GuildDelete

type GuildDelete struct {
	Data *discord.Guild `json:"d"`
}

func NewGuildDelete

func NewGuildDelete(rest *rest.Client, data []byte) (*GuildDelete, error)

type GuildEmojisUpdate

type GuildEmojisUpdate struct {
	Data *discord.GuildEmojisUpdateEventFields `json:"d"`
}

func NewGuildEmojisUpdate

func NewGuildEmojisUpdate(rest *rest.Client, data []byte) (*GuildEmojisUpdate, error)

type GuildIntegrationsUpdate

type GuildIntegrationsUpdate struct {
	Data *discord.GuildIntegrationsUpdateEventFields `json:"d"`
}

func NewGuildIntegrationsUpdate

func NewGuildIntegrationsUpdate(rest *rest.Client, data []byte) (*GuildIntegrationsUpdate, error)

type GuildMemberAdd

type GuildMemberAdd struct {
	Data *discord.GuildMember `json:"d"`
}

func NewGuildMemberAdd

func NewGuildMemberAdd(rest *rest.Client, data []byte) (*GuildMemberAdd, error)

type GuildMemberRemove

type GuildMemberRemove struct {
	Data *discord.GuildMemberRemoveEventFields `json:"d"`
}

func NewGuildMemberRemove

func NewGuildMemberRemove(rest *rest.Client, data []byte) (*GuildMemberRemove, error)

type GuildMemberUpdate

type GuildMemberUpdate struct {
	Data *discord.GuildMember `json:"d"`
}

func NewGuildMemberUpdate

func NewGuildMemberUpdate(rest *rest.Client, data []byte) (*GuildMemberUpdate, error)

type GuildMembersChunk

type GuildMembersChunk struct {
	Data *discord.GuildMembersChunkEventFields `json:"d"`
}

GuildMembersChunk Is sent in response to Guild Request Members. You can use the chunk_index and chunk_count to calculate how many chunks are left for your request.

func NewGuildMembersChunk

func NewGuildMembersChunk(rest *rest.Client, data []byte) (*GuildMembersChunk, error)

type GuildRoleCreate

type GuildRoleCreate struct {
	Data *discord.GuildRoleCreateEventFields `json:"d"`
}

GuildRoleCreate Is sent when a guild role is created.

func NewGuildRoleCreate

func NewGuildRoleCreate(rest *rest.Client, data []byte) (*GuildRoleCreate, error)

type GuildRoleDelete

type GuildRoleDelete struct {
	Data *discord.GuildRoleDeleteEventFields `json:"d"`
}

GuildRoleDelete Is sent when a guild role is deleted.

func NewGuildRoleDelete

func NewGuildRoleDelete(rest *rest.Client, data []byte) (*GuildRoleDelete, error)

type GuildRoleUpdate

type GuildRoleUpdate struct {
	Data *discord.GuildRoleUpdateEventFields `json:"d"`
}

GuildRoleUpdate Is sent when a guild role is updated.

func NewGuildRoleUpdate

func NewGuildRoleUpdate(rest *rest.Client, data []byte) (*GuildRoleUpdate, error)

type GuildStickersUpdate

type GuildStickersUpdate struct {
	Data *discord.GuildStickersUpdateEventFields `json:"d"`
}

func NewGuildStickersUpdate

func NewGuildStickersUpdate(rest *rest.Client, data []byte) (*GuildStickersUpdate, error)

type GuildUpdate

type GuildUpdate struct {
	Data *discord.Guild `json:"d"`
}

func NewGuildUpdate

func NewGuildUpdate(rest *rest.Client, data []byte) (*GuildUpdate, error)

type InteractionCreate

type InteractionCreate struct {
	Data *discord.Interaction `json:"d"`
}

func NewInteractionCreate

func NewInteractionCreate(rest *rest.Client, data []byte) (*InteractionCreate, error)

type MessageCreate

type MessageCreate struct {
	Data *discord.Message `json:"d"`
}

func NewMessageCreate

func NewMessageCreate(rest *rest.Client, data []byte) (*MessageCreate, error)

type MessageDelete

type MessageDelete struct {
	Data struct {
		Id        string `json:"id"`
		ChannelId string `json:"channel_id"`
		GuildId   string `json:"guild_id"`
	} `json:"d"`
}

func NewMessageDelete

func NewMessageDelete(_ *rest.Client, data []byte) (*MessageDelete, error)

type MessageReactionAdd

type MessageReactionAdd struct {
	Data *discord.MessageReaction `json:"d"`
}

func NewMessageReactionAdd

func NewMessageReactionAdd(rest *rest.Client, data []byte) (*MessageReactionAdd, error)

type PresenceUpdate

type PresenceUpdate struct {
	Data struct {
		User         *discord.User       `json:"user"`
		GuildId      string              `json:"guild_id"`
		Status       string              `json:"status"`
		Activities   []*discord.Activity `json:"activities"`
		ClientStatus *ClientStatus       `json:"client_status"`
	} `json:"d"`
}

func NewPresenceUpdate

func NewPresenceUpdate(_ *rest.Client, data []byte) (*PresenceUpdate, error)

type Ready

type Ready struct {
	Data struct {
		Version   int              `json:"v"`
		User      *discord.User    `json:"user"`
		Guilds    []*discord.Guild `json:"guilds"`
		SessionID string           `json:"session_id"`
		Shard     []int            `json:"shard,omitempty"`
	} `json:"d"`
}

func NewReady

func NewReady(data []byte) (*Ready, error)

type ThreadCreate

type ThreadCreate struct {
	Data *discord.Channel `json:"d"`
}

func NewThreadCreate

func NewThreadCreate(rest *rest.Client, data []byte) (*ThreadCreate, error)

type ThreadDelete

type ThreadDelete struct {
	Data *discord.Channel `json:"d"`
}

func NewThreadDelete

func NewThreadDelete(rest *rest.Client, data []byte) (*ThreadDelete, error)

type ThreadListSync

type ThreadListSync struct {
	Data *discord.ThreadListSyncEventFields `json:"d"`
}

func NewThreadListSync

func NewThreadListSync(rest *rest.Client, data []byte) (*ThreadListSync, error)

type ThreadMemberUpdate

type ThreadMemberUpdate struct {
	Data *discord.ThreadMember `json:"d"`
}

func NewThreadMemberUpdate

func NewThreadMemberUpdate(rest *rest.Client, data []byte) (*ThreadMemberUpdate, error)

type ThreadMembersUpdate

type ThreadMembersUpdate struct {
	Data *discord.ThreadMembersUpdateEventFields `json:"d"`
}

func NewThreadMembersUpdate

func NewThreadMembersUpdate(rest *rest.Client, data []byte) (*ThreadMembersUpdate, error)

type ThreadUpdate

type ThreadUpdate struct {
	Data *discord.Channel `json:"d"`
}

func NewThreadUpdate

func NewThreadUpdate(rest *rest.Client, data []byte) (*ThreadUpdate, error)

type VoiceServerUpdate

type VoiceServerUpdate struct {
	Data *discord.VoiceServerUpdateEventFields `json:"d"`
}

func NewVoiceServerUpdate

func NewVoiceServerUpdate(rest *rest.Client, data []byte) (*VoiceServerUpdate, error)

type VoiceStateUpdate

type VoiceStateUpdate struct {
	Data *discord.VoiceState `json:"d"`
}

func NewVoiceStateUpdate

func NewVoiceStateUpdate(rest *rest.Client, data []byte) (*VoiceStateUpdate, error)

Jump to

Keyboard shortcuts

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