added success message
This commit is contained in:
parent
3e4f3efa12
commit
6d79e8d9a0
|
@ -26,7 +26,15 @@ func (app *application) addWord(s *discordgo.Session, m *discordgo.MessageCreate
|
|||
return
|
||||
}
|
||||
|
||||
app.updateAllBadWords()
|
||||
|
||||
|
||||
err = app.updateAllBadWords()
|
||||
if err != nil {
|
||||
app.unknownError(err, s, true, m.ChannelID)
|
||||
return
|
||||
}
|
||||
|
||||
app.successMessage(s, m)
|
||||
}
|
||||
|
||||
func (app *application) removeWord(s *discordgo.Session, m *discordgo.MessageCreate, splitCommand []string) {
|
||||
|
@ -53,7 +61,13 @@ func (app *application) removeWord(s *discordgo.Session, m *discordgo.MessageCre
|
|||
return
|
||||
}
|
||||
|
||||
app.updateAllBadWords()
|
||||
err = app.updateAllBadWords()
|
||||
if err != nil {
|
||||
app.unknownError(err, s, true, m.ChannelID)
|
||||
return
|
||||
}
|
||||
|
||||
app.successMessage(s, m)
|
||||
}
|
||||
|
||||
func (app *application) addAdmin(s *discordgo.Session, m *discordgo.MessageCreate, splitCommand []string) {
|
||||
|
@ -100,6 +114,8 @@ func (app *application) addAdmin(s *discordgo.Session, m *discordgo.MessageCreat
|
|||
return
|
||||
}
|
||||
|
||||
app.successMessage(s, m)
|
||||
|
||||
}
|
||||
|
||||
func (app *application) removeAdmin(s *discordgo.Session, m *discordgo.MessageCreate, splitCommand []string) {
|
||||
|
@ -146,4 +162,6 @@ func (app *application) removeAdmin(s *discordgo.Session, m *discordgo.MessageCr
|
|||
return
|
||||
}
|
||||
|
||||
app.successMessage(s, m)
|
||||
|
||||
}
|
|
@ -227,4 +227,12 @@ func (app *application) contextLength(splitCommand []string) (error) {
|
|||
return errors.New("not enough context")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (app *application) successMessage(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||
_, err := s.ChannelMessageSend(m.ChannelID, "Success!")
|
||||
if err != nil {
|
||||
app.unknownError(err, s, true, m.ChannelID)
|
||||
return
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue