Features: Make cat work for all roles.

master
Marc Egerton 2020-04-26 21:05:39 +01:00
parent 5d3d3c41b3
commit 1d970de88a
1 changed files with 8 additions and 3 deletions

View File

@ -11,9 +11,14 @@ import (
) )
func (f *Features) handleCat(s *discordgo.Session, m *discordgo.MessageCreate) error { func (f *Features) handleCat(s *discordgo.Session, m *discordgo.MessageCreate) error {
if f.Auth.CheckAdminRole(m.Member) { _, err := s.ChannelMessageSend(m.ChannelID, "https://giphy.com/gifs/cat-cute-no-rCxogJBzaeZuU")
_, _ = s.ChannelMessageSend(m.ChannelID, "https://giphy.com/gifs/cat-cute-no-rCxogJBzaeZuU") if err != nil {
_ = s.ChannelMessageDelete(m.ChannelID, m.ID) return err
}
err = s.ChannelMessageDelete(m.ChannelID, m.ID)
if err != nil {
return err
} }
return nil return nil