Documentation ¶
Index ¶
- func CloseConnection()
- func CountMessagesOfPlayer(name string) (int32, error)
- func ExpiredWarnings() (<-chan model.Warning, error)
- func Init() error
- func InsertDiscordMessage(ctx context.Context, message *discordgo.Message) error
- func InsertMessage(message *discordgo.Message) error
- func InsertMute(mute *model.Mute) error
- func InsertUnMute(unmute *model.Unmute) error
- func InsertWarning(warning *model.Warning) error
- func SearchByDiscordTag(discordTag string) (*model.User, error)
- func UserById(ctx context.Context, id int) (*model.User, error)
- func UsersByDiscordAccount(ctx context.Context, user *discordgo.User) ([]*model.User, error)
- func UsersByDiscordId(ctx context.Context, id string) ([]*model.User, error)
- func UsersByDiscordTag(ctx context.Context, tag string) ([]*model.User, error)
- func WarningsByUser(user *discordgo.Member) ([]*model.Warning, error)
- type ChatMessage
- type UserNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseConnection ¶
func CloseConnection()
func CountMessagesOfPlayer ¶
func ExpiredWarnings ¶
func InsertDiscordMessage ¶
func InsertMessage ¶
func InsertMute ¶
func InsertUnMute ¶
func InsertWarning ¶
func UsersByDiscordAccount ¶
UserByDiscordAccount returns the user with the given discord account it searches by the discord id, if the id exists it returns the user if the id does not exist it searches by the discord tag
func UsersByDiscordId ¶
func UsersByDiscordTag ¶
Types ¶
type ChatMessage ¶
type ChatMessage struct { UUID string `bson:"uuid,omitempty" json:"uuid"` Name string `bson:"name,omitempty" json:"name"` Prefix string `bson:"prefix,omitempty" json:"prefix"` Message string `bson:"message,omitempty" json:"message"` ClientName string `bson:"client_name,omitempty" json:"clientName"` Timestamp time.Time `bson:"timestamp,omitempty" json:"timestamp"` }
type UserNotFoundError ¶
type UserNotFoundError struct {
UserId int
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.