package
0.0.0-20210807173805-52a80d555a2e
Repository: https://github.com/gord-project/gord.git
Documentation: pkg.go.dev

# Functions

AcknowledgeChannel acknowledges all messages in the given channel.
CompareChannels checks which channel is smaller.
CreateMessageLoader creates a MessageLoader using the given MessageDataSupplier.
FindDMChannelWithUser tries to find a DM channel with the specified user as one of its two recipients.
FindEmojiInGuild searches for a fitting emoji.
GenerateQuote formats a message quote using the given Input.
GetMemberColor gets the members color according the members role.
GetMemberName returns the name to use for representing this user.
GetPrivateChannelName generates a name for a private channel.
GetPrivateChannelNameUnescaped generates a name for a private channel.
GetRoleColor returns the roles color in the format #RRGGBB or an empty string if there's no color.
GetUserColor gers a user color according to the configuration.
GetUserName returns the users username, prepending the bot prefix in case he is a bot.
HandleReactionAdd adds a new reaction to a message or updates the count if that message already has a reaction with that same emoji.
HandleReactionRemove removes an existing reaction to a message or updates the count if the same message still has reactions with the same emoji left.
HandleReactionRemoveAll removes all reactions from all users in a message.
HasReadMessagesPermission checks if the user has permission to view a specific channel.
IsBlocked checks whether the state contains any relationship that says the given user has been blocked.
LoadGuilds loads all guilds the current user is part of.
MentionsCurrentUserExplicitly checks whether the message contains any explicit mentions for the user associated with the currently logged in user.
MessageToPlainText converts a discord message to a human readable text.
ReplaceMentions replaces both user mentions and global mentions like @here and @everyone.
ResolveFilePathAndSendFile will attempt to resolve the message and see if it points to a file on the users harddrive.
SendMessageAsFile sends the given message into the given channel using the passed discord Session.
SortGuilds sorts the guilds according to the users settings.
SortMessagesByTimestamp sorts all messages in the given array according to their creation date.
SortPrivateChannels sorts private channels depending on their last message.
SortUserRoles sorts an array of roleIDs according to the guilds roles.

# Structs

MessageLoader represents a util object that remember which channels have already been cached and which not.

# Interfaces

GuildLoader reflects an instance that allows loading guilds from a discord backend.
MessageDataSupplier defines the method that is necessary for requesting channels.