Documentation ¶
Index ¶
- type Antispam
- func (a *Antispam) AddUserToDeniedList(userId userIdType)
- func (a *Antispam) Enabled() bool
- func (a *Antispam) GenerateAlertMessage(i *dgo.MessageCreate) *dgo.MessageSend
- func (a *Antispam) GetTrackedChannelIds() []string
- func (a *Antispam) GetUserMessages(userId userIdType) map[string]string
- func (a *Antispam) GetUserUniqueMessages(userId userIdType) map[string]string
- func (a *Antispam) Handler(s *dgo.Session, i *dgo.MessageCreate)
- func (a *Antispam) IsChannelIdTrackable(channelId string) bool
- func (a *Antispam) IsUserInDeniedList(userId userIdType) bool
- func (a *Antispam) IsUserWithinMaxChannelsLimit(userId userIdType) bool
- func (a *Antispam) StoreMessage(userId userIdType, channelId string, message Message)
- func (a *Antispam) TrackHandler(s *dgo.Session, i *dgo.MessageCreate)
- type Message
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Antispam ¶
type Antispam struct {
// contains filtered or unexported fields
}
func NewAntispam ¶
func (*Antispam) AddUserToDeniedList ¶
func (a *Antispam) AddUserToDeniedList(userId userIdType)
func (*Antispam) GenerateAlertMessage ¶
func (a *Antispam) GenerateAlertMessage(i *dgo.MessageCreate) *dgo.MessageSend
func (*Antispam) GetTrackedChannelIds ¶
func (*Antispam) GetUserMessages ¶
GetUserMessages retrieves the messages associated with a user and organizes them in a map. The keys of the map represent the channel IDs, and the corresponding values are the message IDs.
Note: This function is designed to be used with an Antispam instance and requires a valid userIdType parameter.
Parameters:
- userId: The unique identifier of the user for whom messages are to be retrieved.
Returns:
- map[string]string: A map where keys are channel IDs, and values are message IDs.
func (*Antispam) GetUserUniqueMessages ¶
func (*Antispam) IsChannelIdTrackable ¶
func (*Antispam) IsUserInDeniedList ¶
func (*Antispam) IsUserWithinMaxChannelsLimit ¶
func (*Antispam) StoreMessage ¶
func (*Antispam) TrackHandler ¶
func (a *Antispam) TrackHandler(s *dgo.Session, i *dgo.MessageCreate)
type Message ¶
type Options ¶
type Options struct { Cfg yaml.Antispam Moderators *moderators.Moderators }
Click to show internal directories.
Click to hide internal directories.