fix(commands,channels): error handling for not found groups

This commit is contained in:
Guz
2024-09-04 17:04:01 -03:00
parent decc8fa733
commit c6d5d81590

View File

@@ -358,7 +358,7 @@ func getChannel(db gconf.DB, guildID, channelID string) (gdb.Channel, error) {
func getChannelInfo(db gconf.DB, ch gdb.Channel) (*dgo.MessageEmbed, error) {
group, err := db.ChannelGroup(ch.GuildID, ch.ID)
if !errors.Is(err, gdb.ErrNotFound) {
if err != nil && !errors.Is(err, gdb.ErrNotFound) {
return nil, err
}