Documentation ¶
Index ¶
- type Client
- func (c *Client) AddMessageHandler(handler func(*discordgo.Session, *discordgo.MessageCreate))
- func (c *Client) AddReactionHandler(handler func(*discordgo.Session, *discordgo.MessageReactionAdd))
- func (c *Client) AddReadyHandler(handler func(*discordgo.Session, *discordgo.Ready))
- func (c *Client) Close() error
- func (c *Client) EditMessage(ctx context.Context, cID, mID, content string) (string, error)
- func (c *Client) EditMessageEmbed(ctx context.Context, cID, mID string, content *discordgo.MessageEmbed) (string, error)
- func (c *Client) GetChannelID(gID string) string
- func (c *Client) GetDisableAutoNext(gID string) bool
- func (c *Client) GetGuildByChannelID(ctx context.Context, cID string) (*discordgo.Guild, error)
- func (c *Client) GetStopped(gID string) bool
- func (c *Client) InitVoice(gID string)
- func (c *Client) IsPlayerExist(gID string) bool
- func (c *Client) IsPlaying(gID string) bool
- func (c *Client) JoinVoiceChannel(ctx context.Context, m *discordgo.MessageCreate, g *discordgo.Guild) error
- func (c *Client) LeaveVoiceChannel(ctx context.Context, m *discordgo.MessageCreate, g *discordgo.Guild) error
- func (c *Client) Pause(gID string)
- func (c *Client) Resume(gID string)
- func (c *Client) Run() error
- func (c *Client) SendMessage(ctx context.Context, cID, content string) (string, error)
- func (c *Client) SendMessageEmbed(ctx context.Context, cID string, content *discordgo.MessageEmbed) (string, error)
- func (c *Client) SetDisableAutoNext(gID string, value bool)
- func (c *Client) SetPlayerExist(gID string, value bool)
- func (c *Client) SetPlaying(ctx context.Context, gID string, value bool) error
- func (c *Client) Skip(gID string)
- func (c *Client) Stop(gID string)
- func (c *Client) Stream(ctx context.Context, gID, path string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is discord client.
func (*Client) AddMessageHandler ¶
func (c *Client) AddMessageHandler(handler func(*discordgo.Session, *discordgo.MessageCreate))
AddMessageHandler to add message handler.
func (*Client) AddReactionHandler ¶
func (c *Client) AddReactionHandler(handler func(*discordgo.Session, *discordgo.MessageReactionAdd))
AddReactionHandler to add reaction handler.
func (*Client) AddReadyHandler ¶
AddReadyHandler to add ready handler.
func (*Client) EditMessage ¶
EditMessage to edit message.
func (*Client) EditMessageEmbed ¶
func (c *Client) EditMessageEmbed(ctx context.Context, cID, mID string, content *discordgo.MessageEmbed) (string, error)
EditMessageEmbed to edit embed message.
func (*Client) GetChannelID ¶
GetChannelID to get channel id.
func (*Client) GetDisableAutoNext ¶
GetDisableAutoNext to get disable auto next.
func (*Client) GetGuildByChannelID ¶
GetGuildByChannelID to get guild by channel id.
func (*Client) IsPlayerExist ¶
IsPlayerExist to get is player exist.
func (*Client) JoinVoiceChannel ¶
func (c *Client) JoinVoiceChannel(ctx context.Context, m *discordgo.MessageCreate, g *discordgo.Guild) error
JoinVoiceChannel to join voice channel.
func (*Client) LeaveVoiceChannel ¶
func (c *Client) LeaveVoiceChannel(ctx context.Context, m *discordgo.MessageCreate, g *discordgo.Guild) error
LeaveVoiceChannel to leave voice channel.
func (*Client) SendMessage ¶
SendMessage to send message.
func (*Client) SendMessageEmbed ¶
func (c *Client) SendMessageEmbed(ctx context.Context, cID string, content *discordgo.MessageEmbed) (string, error)
SendMessageEmbed to send embed message.
func (*Client) SetDisableAutoNext ¶
SetDisableAutoNext to set disable auto next.
func (*Client) SetPlayerExist ¶
SetPlayerExist to set player exist.
func (*Client) SetPlaying ¶
SetPlaying to set playing.