Add comments on new methods

This commit is contained in:
Carson Hoffman 2020-10-29 11:42:11 -04:00
parent 2f40c4489c
commit 92c52f3db1
No known key found for this signature in database
GPG key ID: 05B660CB452C657F

View file

@ -993,6 +993,8 @@ func (s *State) UserChannelPermissions(userID, channelID string) (apermissions i
return memberPermissions(guild, channel, userID, member.Roles), nil return memberPermissions(guild, channel, userID, member.Roles), nil
} }
// MessagePermissions returns the permissions of the author of the message
// in the channel in which it was sent.
func (s *State) MessagePermissions(message *Message) (apermissions int, err error) { func (s *State) MessagePermissions(message *Message) (apermissions int, err error) {
if s == nil { if s == nil {
return 0, ErrNilState return 0, ErrNilState
@ -1043,6 +1045,8 @@ func (s *State) UserColor(userID, channelID string) int {
return firstRoleColorColor(guild, member.Roles) return firstRoleColorColor(guild, member.Roles)
} }
// MessageColor returns the color of the author's name as displayed
// in the client associated with this message.
func (s *State) MessageColor(message *Message) int { func (s *State) MessageColor(message *Message) int {
if s == nil { if s == nil {
return 0 return 0