Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Db ¶
type Db struct {
// contains filtered or unexported fields
}
Db represents a connection to the database and provides methods for interacting with it.
func (Db) DeleteSubscribedChannel ¶
func (Db) SubscribedChannels ¶
func (d Db) SubscribedChannels(guildIds []string) ([]SubscribedChannel, error)
SubscribedChannels returns a slice of SubscribedChannels that are exist in the given guild ids.
func (Db) UpdateSubscribedChannel ¶
func (d Db) UpdateSubscribedChannel(channelId, guildId, notificationType, launchMentions string) (changed bool, err error)
UpdateSubscribedChannel sets the notification type and launch mentions for a given channel ID. guildId is required to ensure that the channel exists in that guild.
type SubscribedChannel ¶
type SubscribedChannel struct { Id string `db:"channel_id"` GuildId string `db:"guild_id"` Name string `db:"channel_name"` NotificationType string `db:"notification_type"` LaunchMentions sql.NullString `db:"launch_mentions"` }
SubscribedChannel represents a subscribed channel from the database.
Click to show internal directories.
Click to hide internal directories.