4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-09-11 00:42:30 +00:00

Update vendor (bwmarrin/discordgo)

This commit is contained in:
Wim
2017-07-16 14:38:45 +02:00
parent aec5e3d77b
commit 5db24aa901
24 changed files with 1072 additions and 659 deletions

View File

@@ -11,6 +11,7 @@ package discordgo
import (
"fmt"
"io"
"regexp"
)
@@ -31,6 +32,53 @@ type Message struct {
Reactions []*MessageReactions `json:"reactions"`
}
// File stores info about files you e.g. send in messages.
type File struct {
Name string
Reader io.Reader
}
// MessageSend stores all parameters you can send with ChannelMessageSendComplex.
type MessageSend struct {
Content string `json:"content,omitempty"`
Embed *MessageEmbed `json:"embed,omitempty"`
Tts bool `json:"tts"`
File *File `json:"file"`
}
// MessageEdit is used to chain parameters via ChannelMessageEditComplex, which
// is also where you should get the instance from.
type MessageEdit struct {
Content *string `json:"content,omitempty"`
Embed *MessageEmbed `json:"embed,omitempty"`
ID string
Channel string
}
// NewMessageEdit returns a MessageEdit struct, initialized
// with the Channel and ID.
func NewMessageEdit(channelID string, messageID string) *MessageEdit {
return &MessageEdit{
Channel: channelID,
ID: messageID,
}
}
// SetContent is the same as setting the variable Content,
// except it doesn't take a pointer.
func (m *MessageEdit) SetContent(str string) *MessageEdit {
m.Content = &str
return m
}
// SetEmbed is a convenience function for setting the embed,
// so you can chain commands.
func (m *MessageEdit) SetEmbed(embed *MessageEmbed) *MessageEdit {
m.Embed = embed
return m
}
// A MessageAttachment stores data for message attachments.
type MessageAttachment struct {
ID string `json:"id"`