1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-12-01 08:37:23 +00:00

State: fix case where Role would return nil error, even though no role was found

This commit is contained in:
mavolin 2020-10-18 22:37:01 +02:00 committed by diamondburned
parent 1bec57523d
commit 6dabffb46c

View file

@ -636,6 +636,10 @@ func (s *State) Role(guildID discord.GuildID, roleID discord.RoleID) (*discord.R
}
}
if role == nil {
return nil, ErrStoreNotFound
}
return role, nil
}