Documentation ¶
Index ¶
- func ClearReadStateFor(channelID string)
- func HasBeenMentioned(channelID string) bool
- func HasBeenRead(channel *discordgo.Channel, lastMessageID string) bool
- func HasGuildBeenMentioned(guildID string) bool
- func HasGuildBeenRead(guildID string) bool
- func IsGuildChannelMuted(channel *discordgo.Channel) bool
- func IsGuildMuted(guildID string) bool
- func IsPrivateChannelMuted(channel *discordgo.Channel) bool
- func Load(sessionState *discordgo.State)
- func MarkAsMentioned(channelID string)
- func UpdateRead(session *discordgo.Session, channel *discordgo.Channel, lastMessageID string) error
- func UpdateReadBuffered(session *discordgo.Session, channel *discordgo.Channel, lastMessageID string)
- func UpdateReadLocal(channelID string, lastMessageID string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearReadStateFor ¶
func ClearReadStateFor(channelID string)
ClearReadStateFor clears all entries for the given Channel.
func HasBeenMentioned ¶
HasBeenMentioned checks whether the currently logged in user has been mentioned in this channel.
func HasBeenRead ¶
HasBeenRead checks whether the passed channel has an unread Message or not.
func HasGuildBeenMentioned ¶
HasGuildBeenMentioned checks whether any channel in the guild mentioned the currently logged in user.
func HasGuildBeenRead ¶
HasGuildBeenRead returns true if the guild has no unread messages or is muted.
func IsGuildChannelMuted ¶
IsGuildChannelMuted checks whether a guild channel has been set to silent.
func IsGuildMuted ¶
IsGuildMuted returns whether the user muted the given guild.
func IsPrivateChannelMuted ¶
IsPrivateChannelMuted checks whether a private channel has been set to silent.
func MarkAsMentioned ¶
func MarkAsMentioned(channelID string)
MarkAsMentioned sets the given channel ID to mentioned.
func UpdateRead ¶
UpdateRead tells the discord server that a channel has been read. If the channel has already been read and this method was called needlessly, then this will be a No-OP.
func UpdateReadBuffered ¶
func UpdateReadBuffered(session *discordgo.Session, channel *discordgo.Channel, lastMessageID string)
UpdateReadBuffered triggers an acknowledgement after a certain amount of seconds. If this message is called again during that time, the timer will be reset. This avoid unnecessarily many calls to the Discord servers.
func UpdateReadLocal ¶
UpdateReadLocal can be used to locally update the data without sending anything to the Discord API. The update will only be applied if the new message ID is greater than the old one.
Types ¶
This section is empty.