Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractMessageURL ¶
ExtractMessageURL はDiscord Message URLのみを抽出して返す https://discord.com/channels/123456789123456789/123456789123456789/123456789123456789
func FetchMessage ¶
FetchMessage はDiscord Message URLから*discordgo.Messageを取得して返す
func FetchMessageFromParsed ¶
func FetchMessageFromParsed(session *discordgo.Session, parsedURL MessageURL) (*discordgo.Message, error)
FetchMessageFromParsed はParse済みのMessageURLから*discordgo.Messageを取得して返す
Types ¶
type ExpandedMessage ¶
type ExpandedMessage struct {
Guild *discordgo.Guild
GuildID string
ChannelID string
MessageID string
Content string
Author *discordgo.User
Timestamp time.Time
Attachments []*discordgo.MessageAttachment
Embeds []*discordgo.MessageEmbed
JumpURL string
}
ExpandedMessage はDiscord Message URLの展開結果を保持
func Expand ¶
func Expand(session *discordgo.Session, url string) (*ExpandedMessage, error)
Expand はDiscord Message URLからMessageを展開して返す
func ExpandFromParsed ¶
func ExpandFromParsed(session *discordgo.Session, parsedURL MessageURL) (*ExpandedMessage, error)
ExpandFromParsed はParse済みMessageURLからMessageを展開して返す
type MessageURL ¶
MessageURL はDiscord Message URLと各IDを保持
func ParseMessageURL ¶
func ParseMessageURL(url string) (MessageURL, error)
ParseMessageURL はDiscord Message URLを解析し、URL・GuildID・ChannelID・MessageIDを返す
