From 92c52f3db1f8acaabacbbd1f0b60d7614af17e07 Mon Sep 17 00:00:00 2001 From: Carson Hoffman Date: Thu, 29 Oct 2020 11:42:11 -0400 Subject: [PATCH] Add comments on new methods --- state.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/state.go b/state.go index fd77c31..f2d461a 100644 --- a/state.go +++ b/state.go @@ -993,6 +993,8 @@ func (s *State) UserChannelPermissions(userID, channelID string) (apermissions i 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) { if s == nil { return 0, ErrNilState @@ -1043,6 +1045,8 @@ func (s *State) UserColor(userID, channelID string) int { 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 { if s == nil { return 0