music

package
v0.0.0-...-abf6750 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VServerUpdateEvent = core.Event{
	Handler: func(e *gateway.VoiceServerUpdateEvent) {

	},
}
View Source
var VStateUpdateEvent = core.Event{
	Handler: func(e *gateway.VoiceStateUpdateEvent) {
		if e.UserID != core.Self.ID {
			return
		}

		if player := music.GetPlayer(e.GuildID); player != nil && e.ChannelID.IsNull() {
			player.Stop(false)

			logs, err := core.State.AuditLog(e.GuildID, api.AuditLogData{ActionType: discord.MemberDisconnect, Limit: 1})
			if err == nil && len(logs.Users) > 0 && time.Since(logs.Entries[0].CreatedAt()) < 5*time.Second {
				player.Send(emojis.Cry, "O vacilão do <@%s> me expulsou do batidão, bonk nele %s", logs.Entries[0].UserID, emojis.AnimatedBonk)
			} else {
				player.Send(emojis.AnimatedBonk, "Quem foi o vacião que me expulsou do batidão? %s", emojis.Cry)
			}
		}
	},
}

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