Documentation ¶
Index ¶
- Constants
- type Discord
- func (t *Discord) Connect(ctx context.Context) error
- func (t *Discord) Disconnect(ctx context.Context) error
- func (t *Discord) EditMessage(channelID string, messageID string, message string) error
- func (t *Discord) GetIGNName(s *discordgo.Session, serverID string, userid string) string
- func (t *Discord) IsConnected() bool
- func (t *Discord) LastSentMessage() (channelID string, messageID string, err error)
- func (t *Discord) Send(req request.DiscordSend) error
- func (t *Discord) SetChannelName(channelID string, name string) error
- func (t *Discord) StatusUpdate(ctx context.Context, online int, customText string) error
- func (t *Discord) Subscribe(ctx context.Context, onMessage func(interface{}) error) error
Constants ¶
View Source
const (
//ActionMessage means discord sent the message
ActionMessage = "message"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discord ¶
type Discord struct {
// contains filtered or unexported fields
}
Discord represents a discord connection
func (*Discord) Disconnect ¶
Disconnect stops a previously started connection with Discord. If called while a connection is not active, returns nil
func (*Discord) EditMessage ¶ added in v1.0.2
EditMessage lets you edit a previously sent message
func (*Discord) GetIGNName ¶ added in v1.0.2
GetIGNName returns an IGN: tagged name from discord if applicable
func (*Discord) IsConnected ¶
IsConnected returns if a connection is established
func (*Discord) LastSentMessage ¶ added in v1.0.2
LastSentMessage returns the channelID and message ID of last message sent
func (*Discord) Send ¶
func (t *Discord) Send(req request.DiscordSend) error
Send sends a message to discord
func (*Discord) SetChannelName ¶ added in v0.0.23
SetChannelName is used for voice channel setting via SQLReport
func (*Discord) StatusUpdate ¶ added in v0.0.4
StatusUpdate updates the status text on discord
Click to show internal directories.
Click to hide internal directories.