Skip to content

Commit

Permalink
Fixed greetings command
Browse files Browse the repository at this point in the history
  • Loading branch information
FlameInTheDark committed Mar 26, 2019
1 parent d5c9bc7 commit e94d823
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions bot/reply.go
Expand Up @@ -155,6 +155,11 @@ func (ctx *Context) ReplyEmbedPM(name, content string) *discordgo.Message {
SendPM(ctx)
}

func (ctx *Context) ReplyPM(content string) *discordgo.Message {
msg, _ := ctx.Discord.ChannelMessageSend(ctx.Message.Author.ID, content)
return msg
}

// ReplyEmbedAttachment reply on message with embed message with attachment
func (ctx *Context) ReplyEmbedAttachment(name, content, fileName string, file io.Reader) *discordgo.Message {
return NewEmbed("").
Expand Down
4 changes: 2 additions & 2 deletions cmd/greetingscommand.go
Expand Up @@ -19,10 +19,10 @@ func GreetingsCommand(ctx bot.Context) {
ctx.ReplyEmbed(ctx.Loc("greetings"), ctx.Loc("greetings_no_text"))
}
case "remove":
ctx.MetricsCommand("greetings", "remove")
ctx.MetricsCommand("greetings", ctx.Loc("greetings_removed"))
ctx.RemoveGreetings()
case "test":
ctx.ReplyEmbed(ctx.Loc("greetings"), ctx.Loc("greetings_removed"))
ctx.ReplyPM(ctx.Guilds.Guilds[ctx.Guild.ID].Greeting)
}
}
} else {
Expand Down

0 comments on commit e94d823

Please sign in to comment.