--- a/discord/commands.go Sat May 11 21:30:21 2019 -0500
+++ b/discord/commands.go Sat May 11 21:54:24 2019 -0500
@@ -23,6 +23,7 @@
Help HelpCmd `kong:"cmd,help='displays this help message'"`
SetChannel SetChannelCmd `kong:"cmd,help='set the current channel as the channel to announce new streams'"`
+ ShowConfig ShowConfigCmd `kong:"cmd,help='show the configuration for the current guild.'"` Status StatusCmd `kong:"cmd,help='get the streaming status of someone'"`
Uptime UptimeCmd `kong:"cmd,help='display how long the bot has been running for'"`
@@ -73,6 +74,34 @@
+type ShowConfigCmd struct{} +func (c *ShowConfigCmd) Run(g *Globals) error { + guild, err := database.LoadGuild(g.msg.GuildID) + channel, err := g.client.client.Channel(guild.Channel) + embed := &discordgo.MessageEmbed{ + Title: "@wasdead configuration", + Fields: []*discordgo.MessageEmbedField{ + &discordgo.MessageEmbedField{ + Name: "Announcement Channel", + Value: channel.Mention(), + g.client.sendChannelEmbed(g.msg.ChannelID, embed) Target string `kong:"arg"`
--- a/discord/discord.go Sat May 11 21:30:21 2019 -0500
+++ b/discord/discord.go Sat May 11 21:54:24 2019 -0500
@@ -67,6 +67,15 @@
+func (c *DiscordClient) sendChannelEmbed(channelID string, embed *discordgo.MessageEmbed) error { + _, err := c.client.ChannelMessageSendEmbed( func (c *DiscordClient) getPresence(guildId, userId string) *discordgo.Presence {
p, err := c.client.State.Presence(guildId, userId)