event

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package event is a universal discord package that holds all the event types one can receive (currently only bot events).

Index

Constants

View Source
const ChannelCreate = "CHANNEL_CREATE"

ChannelCreate Sent when a new channel is created, relevant to the current user. The inner payload is a DM channel or guild channel object.

View Source
const ChannelDelete = "CHANNEL_DELETE"

ChannelDelete Sent when a channel relevant to the current user is deleted. The inner payload is a DM or Guild channel object.

View Source
const ChannelPinsUpdate = "CHANNEL_PINS_UPDATE"

ChannelPinsUpdate Sent when a message is pinned or unpinned in a text channel. This is not sent when a pinned message is deleted.

Fields:
- ChannelID int64 or Snowflake
- LastPinTimestamp time.Now().UTC().Format(time.RFC3339)

TODO fix.

View Source
const ChannelUpdate = "CHANNEL_UPDATE"

ChannelUpdate Sent when a channel is updated. The inner payload is a guild channel object.

View Source
const GuildBanAdd = "GUILD_BAN_ADD"

GuildBanAdd Sent when a user is banned from a guild. The inner payload is a user object, with an extra guild_id key.

View Source
const GuildBanRemove = "GUILD_BAN_REMOVE"

GuildBanRemove Sent when a user is unbanned from a guild. The inner payload is a user object, with an extra guild_id key.

View Source
const GuildCreate = "GUILD_CREATE"

GuildCreate This event can be sent in three different scenarios:

  1. When a user is initially connecting, to lazily load and backfill information for all unavailable guilds sent in the Ready event.
  2. When a Guild becomes available again to the client.
  3. When the current user joins a new Guild.
View Source
const GuildDelete = "GUILD_DELETE"

GuildDelete Sent when a guild becomes unavailable during a guild outage, or when the user leaves or is removed from a guild. The inner payload is an unavailable guild object. If the unavailable field is not set, the user was removed from the guild.

View Source
const GuildEmojisUpdate = "GUILD_EMOJI_UPDATE"

GuildEmojisUpdate Sent when a guild's emojis have been updated.

Fields:
- GuildID Snowflake
- Emojis []*Emoji
View Source
const GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE"

GuildIntegrationsUpdate Sent when a guild integration is updated.

Fields:
- GuildID Snowflake
View Source
const GuildMemberAdd = "GUILD_MEMBER_ADD"

GuildMemberAdd Sent when a new user joins a guild. The inner payload is a guild member object with these extra fields:

  • GuildID Snowflake

    Fields:

  • Member *Member

View Source
const GuildMemberRemove = "GUILD_MEMBER_REMOVE"

GuildMemberRemove Sent when a user is removed from a guild (leave/kick/ban).

Fields:
- GuildID   Snowflake
- User      *User
View Source
const GuildMemberUpdate = "GUILD_MEMBER_UPDATE"

GuildMemberUpdate Sent when a guild member is updated.

Fields:
- GuildID   Snowflake
- Roles     []Snowflake
- User      *User
- Nick      string
View Source
const GuildMembersChunk = "GUILD_MEMBERS_CHUNK"

GuildMembersChunk Sent in response to Gateway Request Guild Members.

Fields:
- GuildID Snowflake
- Members []*Member
View Source
const GuildRoleCreate = "GUILD_ROLE_CREATE"

GuildRoleCreate Sent when a guild role is created.

Fields:
- GuildID   Snowflake
- Role      *Role
View Source
const GuildRoleDelete = "GUILD_ROLE_DELETE"

GuildRoleDelete Sent when a guild role is created.

Fields:
- GuildID Snowflake
- RoleID  Snowflake
View Source
const GuildRoleUpdate = "GUILD_ROLE_UPDATE"

GuildRoleUpdate Sent when a guild role is created.

Fields:
- GuildID Snowflake
- Role    *Role
View Source
const GuildUpdate = "GUILD_UPDATE"

GuildUpdate Sent when a guild is updated. The inner payload is a guild object.

View Source
const MessageCreate = "MESSAGE_CREATE"

MessageCreate Sent when a message is created. The inner payload is a message object.

View Source
const MessageDelete = "MESSAGE_DELETE"

MessageDelete Sent when a message is deleted.

Fields:
- ID        Snowflake
- ChannelID Snowflake
View Source
const MessageDeleteBulk = "MESSAGE_DELETE_BULK"

MessageDeleteBulk Sent when multiple messages are deleted at once.

Fields:
- IDs       []Snowflake
- ChannelID Snowflake
View Source
const MessageReactionAdd = "MESSAGE_REACTION_ADD"

MessageReactionAdd Sent when a user adds a reaction to a message.

Fields:
- UserID     Snowflake
- ChannelID  Snowflake
- MessageID  Snowflake
- Emoji      *Emoji
View Source
const MessageReactionRemove = "MESSAGE_REACTION_REMOVE"

MessageReactionRemove Sent when a user removes a reaction from a message.

Fields:
- UserID     Snowflake
- ChannelID  Snowflake
- MessageID  Snowflake
- Emoji      *Emoji
View Source
const MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL"

MessageReactionRemoveAll Sent when a user explicitly removes all reactions from a message.

Fields:
- ChannelID Snowflake
- MessageID Snowflake
View Source
const MessageUpdate = "MESSAGE_UPDATE"

MessageUpdate Sent when a message is updated. The inner payload is a message object.

NOTE! Has _at_least_ the GuildID and ChannelID fields.

View Source
const PresenceUpdate = "PRESENCE_UPDATE"

PresenceUpdate A user's presence is their current state on a guild. This event is sent when a user's presence is updated for a guild.

Fields:
- User    *User
- Roles   []Snowflake
- Game    *Activity
- GuildID Snowflake
- Status  string
View Source
const Ready = "READY"

Ready The ready event is dispatched when a client has completed the initial handshake with the gateway (for new sessions). // The ready event can be the largest and most complex event the gateway will send, as it contains all the state // required for a client to begin interacting with the rest of the platform. // Fields: // - V int // - User *User // - PrivateChannels []*Channel // - Guilds []*GuildUnavailable // - SessionID string // - Trace []string

View Source
const Resumed = "RESUMED"

Resumed The resumed event is dispatched when a client has sent a resume payload to the gateway (for resuming existing sessions).

Fields:
- Trace []string
View Source
const TypingStart = "TYPING_START"

TypingStart Sent when a user starts typing in a channel.

Fields:
- ChannelID     Snowflake
- UserID        Snowflake
- TimestampUnix int
View Source
const UserUpdate = "USER_UPDATE"

UserUpdate Sent when properties about the user change. Inner payload is a user object.

View Source
const VoiceServerUpdate = "VOICE_SERVER_UPDATE"

VoiceServerUpdate Sent when a guild's voice server is updated. This is sent when initially connecting to voice, and when the current voice instance fails over to a new server.

Fields:
- Token     string
- ChannelID Snowflake
- Endpoint  string
View Source
const VoiceStateUpdate = "VOICE_STATE_UPDATE"

VoiceStateUpdate Sent when someone joins/leaves/moves voice channels. Inner payload is a voice state object.

View Source
const WebhooksUpdate = "WEBHOOKS_UPDATE"

WebhooksUpdate Sent when a guild channel's WebHook is created, updated, or deleted.

Fields:
- GuildID   Snowflake
- ChannelID Snowflake

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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