MCPcopy Create free account
hub / github.com/MMadmer/EpicAssetsNotifyBot / guildConfigsFromSQLite

Function guildConfigsFromSQLite

internal/app/bootstrap.go:131–146  ·  view source on GitHub ↗
(items []sqlitestore.GuildConfig)

Source from the content-addressed store, hash-verified

129}
130
131func guildConfigsFromSQLite(items []sqlitestore.GuildConfig) []model.GuildConfig {
132 result := make([]model.GuildConfig, 0, len(items))
133 for _, item := range items {
134 result = append(result, model.GuildConfig{
135 GuildID: item.GuildID,
136 ChannelID: cloneInt64Ptr(item.ChannelID),
137 ThreadID: cloneInt64Ptr(item.ThreadID),
138 ShownAssets: item.ShownAssets,
139 Locale: item.Locale,
140 MentionRoleID: cloneInt64Ptr(item.MentionRoleID),
141 Enabled: item.Enabled,
142 IncludeImages: item.IncludeImages,
143 })
144 }
145 return result
146}
147
148func userProfilesFromSQLite(items []sqlitestore.UserProfile) []model.UserProfile {
149 result := make([]model.UserProfile, 0, len(items))

Callers 1

LoadSnapshotMethod · 0.85

Calls 1

cloneInt64PtrFunction · 0.70

Tested by

no test coverage detected