Skip to content

Commit

Permalink
Merge branch 'patch/voice-effect-event' into patch/soundboard
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 authored Aug 16, 2024
2 parents 2082aa8 + ae06f00 commit 2590d62
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions discord/soundboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"github.com/disgoorg/snowflake/v2"
)

type SoundboardEffectAnimationType int
type VoiceChannelEffectAnimationType int

const (
SoundboardEffectAnimationTypePremium SoundboardEffectAnimationType = iota
SoundboardEffectAnimationTypeBasic
VoiceChannelEffectAnimationTypePremium VoiceChannelEffectAnimationType = iota
VoiceChannelEffectAnimationTypeBasic
)

type SoundboardSound struct {
Expand Down
12 changes: 6 additions & 6 deletions events/guild_voice_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,37 @@ import (
"github.com/disgoorg/disgo/gateway"
)

// GuildVoiceChannelEffectSend indicates that a discord.User sent an effect in a discord.GuildVoiceChannel
// GuildVoiceChannelEffectSend indicates that a discord.Member sent an effect in a discord.GuildVoiceChannel (requires gateway.IntentGuildVoiceStates)
type GuildVoiceChannelEffectSend struct {
*GenericEvent
gateway.EventVoiceChannelEffectSend
}

// GenericGuildVoiceState is called upon receiving GuildVoiceJoin , GuildVoiceMove , GuildVoiceLeave
// GenericGuildVoiceState is called upon receiving GuildVoiceJoin, GuildVoiceMove and GuildVoiceLeave
type GenericGuildVoiceState struct {
*GenericEvent
VoiceState discord.VoiceState
Member discord.Member
}

// GuildVoiceStateUpdate indicates that the discord.VoiceState of a discord.Member has updated(requires gateway.IntentsGuildVoiceStates)
// GuildVoiceStateUpdate indicates that the discord.VoiceState of a discord.Member has updated (requires gateway.IntentGuildVoiceStates)
type GuildVoiceStateUpdate struct {
*GenericGuildVoiceState
OldVoiceState discord.VoiceState
}

// GuildVoiceJoin indicates that a discord.Member joined a discord.Channel(requires gateway.IntentsGuildVoiceStates)
// GuildVoiceJoin indicates that a discord.Member joined a discord.GuildVoiceChannel (requires gateway.IntentGuildVoiceStates)
type GuildVoiceJoin struct {
*GenericGuildVoiceState
}

// GuildVoiceMove indicates that a discord.Member moved a discord.Channel(requires gateway.IntentsGuildVoiceStates)
// GuildVoiceMove indicates that a discord.Member was moved to a different discord.GuildVoiceChannel (requires gateway.IntentGuildVoiceStates)
type GuildVoiceMove struct {
*GenericGuildVoiceState
OldVoiceState discord.VoiceState
}

// GuildVoiceLeave indicates that a discord.Member left a discord.Channel(requires gateway.IntentsGuildVoiceStates)
// GuildVoiceLeave indicates that a discord.Member left a discord.GuildVoiceChannel (requires gateway.IntentGuildVoiceStates)
type GuildVoiceLeave struct {
*GenericGuildVoiceState
OldVoiceState discord.VoiceState
Expand Down
16 changes: 8 additions & 8 deletions gateway/gateway_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,14 +639,14 @@ func (EventUserUpdate) messageData() {}
func (EventUserUpdate) eventData() {}

type EventVoiceChannelEffectSend struct {
ChannelID snowflake.ID `json:"channel_id"`
GuildID snowflake.ID `json:"guild_id"`
UserID snowflake.ID `json:"user_id"`
Emoji *discord.Emoji `json:"emoji"`
AnimationType *discord.SoundboardEffectAnimationType `json:"animation_type,omitempty"`
AnimationID *int `json:"animation_id,omitempty"`
SoundID *snowflake.ID `json:"sound_id,omitempty"`
SoundVolume *float64 `json:"sound_volume,omitempty"`
ChannelID snowflake.ID `json:"channel_id"`
GuildID snowflake.ID `json:"guild_id"`
UserID snowflake.ID `json:"user_id"`
Emoji *discord.Emoji `json:"emoji"`
AnimationType *discord.VoiceChannelEffectAnimationType `json:"animation_type,omitempty"`
AnimationID *int `json:"animation_id,omitempty"`
SoundID *snowflake.ID `json:"sound_id,omitempty"`
SoundVolume *float64 `json:"sound_volume,omitempty"`
}

func (EventVoiceChannelEffectSend) messageData() {}
Expand Down

0 comments on commit 2590d62

Please sign in to comment.