notifications

package
v0.0.0-...-1fa90be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteNotification

func DeleteNotification(messageID string)

DeleteNotification deletes a notification from the list of notifications. Used after the event has started.

func SaveNotification

func SaveNotification(notification Notification) error

Wrapper function for saveNotification that builds the Notification array to be saved.

func SendNotificationToUsers

func SendNotificationToUsers(s *discordgo.Session, channelID string, messageID string, event string)

SendNotificationToUsers sends a private message to all users who reacted to a message.

Types

type Notification

type Notification struct {
	ChannelID string    `json:"channel_id"`
	Event     string    `json:"event"`
	Timestamp time.Time `json:"timestamp"`
	MessageID string    `json:"message_id"`
}

func LoadNotifications

func LoadNotifications() ([]Notification, error)

LoadNotifications loads the notifications from the data source.

type Wrapper

type Wrapper struct {
	Notifications []Notification `json:"notifications"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL