Documentation ¶
Overview ¶
Package arikawa provides functions and types to convert Arikawa types into darchive types, and vice versa.
Index ¶
- func AttachmentToDarchive(a discord.Attachment) darchive.Attachment
- func ChannelToDarchive(ch discord.Channel) darchive.Channel
- func ChannelsToDarchive(chs []discord.Channel) []darchive.Channel
- func EmbedToDarchive(e discord.Embed) darchive.Embed
- func EmojiToDarchive(e discord.Emoji) darchive.Emoji
- func GuildToDarchive(g discord.Guild) darchive.Guild
- func ReactionToDarchive(r discord.Reaction) darchive.Reaction
- func RoleToDarchive(r discord.Role) darchive.Role
- func RolesToDarchive(rls []discord.Role) []darchive.Role
- func UserToDarchive(u discord.User) darchive.User
- type Converter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachmentToDarchive ¶
func AttachmentToDarchive(a discord.Attachment) darchive.Attachment
AttachmentToDarchive converts a discord.Attachment to a darchive.Attachment
func ChannelToDarchive ¶
ChannelToDarchive converts a discord.Channel to a darchive.Channel
func ChannelsToDarchive ¶
ChannelsToDarchive converts a []discord.Channel to a []darchive.Channel
func EmbedToDarchive ¶
EmbedToDarchive converts a discord.Embed to a darchive.Embed
func EmojiToDarchive ¶
EmojiToDarchive converts a discord.Emoji to a darchive.Emoji
func GuildToDarchive ¶
GuildToDarchive converts a discord.Guild to a darchive.Guild. Note that you will have to set g.Roles and g.Channels manually using RolesToDarchive and ChannelsToDarchive.
func ReactionToDarchive ¶
ReactionToDarchive converts a discord.Reaction to a darchive.Reaction
func RoleToDarchive ¶
RoleToDarchive converts a discord.Role to a darchive.Role
func RolesToDarchive ¶
RolesToDarchive converts a []discord.Role to a []darchive.Role
Types ¶
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
Converter is a struct to convert Arikawa messages to darchive messages. A zero-value Converter is a valid Converter. A Converter should not be reused after c.Build() is called, unless c.Reset() is then called. A Converter should only be used for a single guild before being reset.
func (*Converter) AddChannel ¶
AddChannel adds a channel to the converter.