messages

package
v0.0.0-...-8a39caa Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAttachments

func AddAttachments(attachments []*discordgo.MessageAttachment) string

AddAttachments Inserts a new entry in the attachments table

func AddEmbeds

func AddEmbeds(embeds []*discordgo.MessageEmbed) string

AddEmbeds Inserts a new entry in the embeds table

func AddMessage

func AddMessage(message *discordgo.Message, db *sql.DB)

AddMessage Inserts a new entry in the messages table

func InitAttachmentsTable

func InitAttachmentsTable(db *sql.DB)

InitAttachmentsTable Creates the attachments table

func InitEmbedsTable

func InitEmbedsTable(db *sql.DB)

InitEmbedsTable Creates the embeds table

func InitMessagesTable

func InitMessagesTable(db *sql.DB)

InitMessagesTable Creates the messages table

func UpdateEveryoneMentions

func UpdateEveryoneMentions(mention bool) bool

UpdateEveryoneMentions +1 to @everyone when someone with nothing better to do mentions it

func UpdateMemberMentions

func UpdateMemberMentions(mentions []*discordgo.User) string

UpdateMemberMentions +1 to a member when mentioned

func UpdateRoleMentions

func UpdateRoleMentions(roles []string) string

UpdateRoleMentions +1 to a role when mentioned

Types

type SQLMessage

type SQLMessage struct {
	ID              string
	Type            int
	ChannelID       string
	Content         string
	Characters      int
	Timestamp       string
	EditedTimestamp string
	MentionRoles    string
	Tts             bool
	MentionEveryone bool
	Author          string
	Attachments     string
	Embeds          string
	Mentions        string
	Reactions       string
	Emojis          string
}

SQLMessage Database friendly message struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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