Documentation
¶
Index ¶
Constants ¶
View Source
const ( COMMAND_TYPE_HELP = "help" COMMAND_TYPE_ADD_SUBJECT = "add" COMMAND_TYPE_REMOVE_SUBJECT = "remove" COMMAND_TYPE_LIST_SUBJECT = "list" )
Variables ¶
View Source
var ErrorEmbed = discordgo.MessageEmbed{ URL: "https://github.com/notarock/technews-bot", Title: "Invalid command", Description: "Error occured... let us know.", Fields: []*discordgo.MessageEmbedField{}, }
View Source
var HelpEmbed = discordgo.MessageEmbed{ URL: "https://github.com/notarock/technews-bot", Type: "link", Title: "Technews-bot Help", Fields: []*discordgo.MessageEmbedField{ { Name: "`help`", Value: "Print this help man-page.", Inline: true, }, { Name: "`list`", Value: "Print all bound channels and their related subjects.", Inline: true, }, { Name: "`add`", Value: "Add a technews subject to a bound channel.", Inline: true, }, { Name: "`remove`", Value: "Remove a technews subject from a bound channel.", Inline: true, }, }, }
Functions ¶
This section is empty.
Types ¶
type Command ¶ added in v0.1.0
func (Command) Execute ¶ added in v0.1.0
func (c Command) Execute(s *discordgo.Session, m *discordgo.MessageCreate) discordgo.MessageEmbed
type DiscordClient ¶
type DiscordClient struct {
// contains filtered or unexported fields
}
func Init ¶
func Init(config DiscordConfig) (DiscordClient, error)
func (DiscordClient) SendArticle ¶
func (dc DiscordClient) SendArticle(a articles.Article, channel string)
func (DiscordClient) Wait ¶
func (dc DiscordClient) Wait() error
type DiscordConfig ¶
type DiscordConfig struct {
Token string
}
Click to show internal directories.
Click to hide internal directories.