mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-11-23 13:14:16 +00:00
Discord: EditedTimestamp no longer a pointer
This commit is contained in:
parent
f33dc2ee75
commit
60f1963c4b
|
|
@ -188,9 +188,15 @@ func MemberColor(guild Guild, member Member) Color {
|
|||
var pos int
|
||||
|
||||
for _, r := range guild.Roles {
|
||||
if r.Color > 0 && r.Position > pos {
|
||||
c = r.Color
|
||||
pos = r.Position
|
||||
for _, mr := range member.RoleIDs {
|
||||
if mr != r.ID {
|
||||
continue
|
||||
}
|
||||
|
||||
if r.Color > 0 && r.Position > pos {
|
||||
c = r.Color
|
||||
pos = r.Position
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ type Message struct {
|
|||
|
||||
Content string `json:"content"`
|
||||
|
||||
Timestamp Timestamp `json:"timestamp,omitempty"`
|
||||
EditedTimestamp *Timestamp `json:"edited_timestamp,omitempty"`
|
||||
Timestamp Timestamp `json:"timestamp,omitempty"`
|
||||
EditedTimestamp Timestamp `json:"edited_timestamp,omitempty"`
|
||||
|
||||
TTS bool `json:"tts"`
|
||||
Pinned bool `json:"pinned"`
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// Timestamp has a valid zero-value, which can be checked using the Valid()
|
||||
// method. This is useful for optional timestamps such as EditedTimestamp.
|
||||
type Timestamp time.Time
|
||||
|
||||
const TimestampFormat = time.RFC3339 // same as ISO8601
|
||||
|
|
|
|||
Loading…
Reference in a new issue