Layla
73a63fbf4d
This PR adds the functionality for plugins to send and recieve messages linked to a specific channel. Co-authored-by: Layla <layla@layla.gg> Reviewed-on: https://gitea.sumulayla.synology.me/layla/birdbot/pulls/4
16 lines
386 B
Go
16 lines
386 B
Go
package persistence
|
|
|
|
// Database is an interface used to wrap persistant data
|
|
type Database interface {
|
|
GetDiscordMessage(id string) (string, error)
|
|
SetDiscordMessage(id string, messageID string) error
|
|
|
|
GetDiscordWebhook(id string) (*DBDiscordWebhook, error)
|
|
SetDiscordWebhook(id string, data *DBDiscordWebhook) error
|
|
}
|
|
|
|
type DBDiscordWebhook struct {
|
|
ID string
|
|
Token string
|
|
}
|