Documentation ¶
Index ¶
- Constants
- type BibleBook
- type BibleBookName
- type BibleBookNameService
- type BibleBookService
- type BibleVerse
- type BibleVerseService
- type BibleVersion
- type BibleVersionService
- type Bot
- type Database
- type Guild
- type GuildService
- type Handler
- type Log
- type LogEntry
- type LogEntryService
- type LogService
- type LogType
- type LogTypeService
- type Member
- type MemberService
- type ModMailEntry
- type ModMailEntryService
- type ReactionRole
- type ReactionRoleService
- type Role
- type RoleService
- type Sound
- type SoundService
- type Soundboard
- type User
- type UserService
Constants ¶
View Source
const ( LogTypeJoinLeave = iota LogTypeMemberUpdate LogTypeServerUpdate LogTypeMessageUpdate LogTypeChannelUpdate LogTypeModMail LogTypeMod )
View Source
const (
DiscordEpoch = 1420070400000
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BibleBookName ¶
type BibleBookNameService ¶
type BibleBookNameService interface { AddBibleBookName(name BibleBookName) (uint, error) AddBibleBookNames(names []BibleBookName) ([]uint, error) BibleBookName(id uint) (BibleBookName, error) BibleBookNamesByBook(bookID uint) ([]BibleBookName, error) UpdateBibleBookName(name BibleBookName) (uint, error) RemoveBibleBookName(id uint) (uint, error) }
type BibleBookService ¶
type BibleBookService interface { AddBibleBook(book BibleBook) (uint, error) AddBibleBooks(books []BibleBook) ([]uint, error) BibleBook(id uint) (BibleBook, error) BibleBookByAbbreviation(abbreviation string) (BibleBook, error) BibleBookByName(name string) (BibleBook, error) UpdateBibleBook(book BibleBook) (uint, error) RemoveBibleBook(id uint) (uint, error) }
type BibleVerse ¶
type BibleVerse struct { gorm.Model BibleVersionID uint `gorm:"index:idx_verse_info,unique"` BibleVersion BibleVersion BibleBookID uint `gorm:"index:idx_verse_info,unique"` BibleBook BibleBook Chapter int `gorm:"index:idx_verse_info,unique"` VerseNumber int `gorm:"index:idx_verse_info,unique"` Content string }
func FilterBibleVerses ¶
func FilterBibleVerses(vs []BibleVerse, f func(BibleVerse) bool) []BibleVerse
func (*BibleVerse) String ¶
func (bv *BibleVerse) String() string
type BibleVerseService ¶
type BibleVerseService interface { AddBibleVerse(verse BibleVerse) (uint, error) AddBibleVerses(verses []BibleVerse) ([]uint, error) BibleVerse(id uint) (BibleVerse, error) BibleVerseByNumber(version, book string, chapter, verseNum int) (BibleVerse, error) BibleVerseRange(version, book string, chapterStart, chapterEnd, verseStart, verseEnd int) ([]BibleVerse, error) BibleVersesByChapter(version, book string, chapter int) ([]BibleVerse, error) UpdateBibleVerse(verse BibleVerse) (uint, error) RemoveBibleVerse(id uint) (uint, error) RemoveBibleVerseByNumber(version, book string, chapter, verseNum int) (uint, error) }
type BibleVersion ¶
type BibleVersionService ¶
type BibleVersionService interface { AddBibleVersion(version BibleVersion) (uint, error) AddBibleVersions(versions []BibleVersion) ([]uint, error) BibleVersion(id uint) (BibleVersion, error) BibleVersionByAbbreviation(abv string) (BibleVersion, error) BibleVersions() ([]BibleVersion, error) RemoveBibleVersion(id uint) (uint, error) RemoveBibleVersionByAbbreviation(abv string) (uint, error) }
type Database ¶
type Database interface { UserService GuildService MemberService RoleService }
type GuildService ¶
type GuildService interface { AddGuild(guild Guild) (uint, error) AddGuilds(guilds []Guild) ([]uint, error) Guild(id uint) (Guild, error) GuildBySnowflake(snowflake string) (Guild, error) Guilds() ([]Guild, error) UpdateGuild(guild Guild) (uint, error) RemoveGuild(id uint) (uint, error) RemoveGuildBySnowflake(snowflake string) (uint, error) }
type LogEntryService ¶
type LogService ¶
type LogService interface { AddLog(log Log) (uint, error) Log(guildID uint, snowflake string) (Log, error) LogByID(logID uint) (Log, error) GuildLogs(snowflake string) ([]Log, error) GuildLogsByType(guildID uint, snowflake string, logTypes ...int) ([]Log, error) UpdateLog(log Log) (uint, error) RemoveLog(guildID uint, snowflake string) (uint, error) }
type LogTypeService ¶
type MemberService ¶
type ModMailEntry ¶
type ModMailEntryService ¶
type ModMailEntryService interface { AddModMailEntry(ModMailEntry) (int64, error) GetModMailEntry(int64) (*ModMailEntry, error) GetGuildModMailEntries(string) ([]ModMailEntry, error) GetAllModMailEntries() ([]ModMailEntry, error) UpdateModMailEntry(ModMailEntry) error RemoveModMailEntry(int64) error }
type ReactionRole ¶
type ReactionRoleService ¶
type ReactionRoleService interface { AddReactionRole(*ReactionRole) error ReactionRole(string, string) (*ReactionRole, error) GuildReactionRoles(string) ([]*ReactionRole, error) MessageReactionRoles(guildID, channelID, messageID string) ([]*ReactionRole, error) UpdateReactionRole(string, int64) error RemoveReactionRole(string, int64) error }
type Role ¶
type RoleService ¶
type SoundService ¶
type Soundboard ¶
type Soundboard struct {
// contains filtered or unexported fields
}
func (*Soundboard) ClearBuffer ¶
func (s *Soundboard) ClearBuffer()
func (*Soundboard) FillBuffer ¶
func (s *Soundboard) FillBuffer(b [][]byte)
func (*Soundboard) PlayBuffer ¶
func (s *Soundboard) PlayBuffer(ses *discordgo.Session, guildID, channelID string) error
type User ¶
type User struct { gorm.Model Snowflake string `gorm:"unique"` BibleVersionID uint BibleVersion BibleVersion }
type UserService ¶
type UserService interface { AddUser(user User) (uint, error) AddUsers(users []User) ([]uint, error) User(id uint) (User, error) UserBySnowflake(snowflake string) (User, error) Users() ([]User, error) UpdateUser(user User) (uint, error) RemoveUser(id uint) (uint, error) RemoveUserBySnowflake(snowflake string) (uint, error) }
Click to show internal directories.
Click to hide internal directories.