diff --git a/api/rate/rate_test.go b/api/rate/rate_test.go index 696e213..c1a0837 100644 --- a/api/rate/rate_test.go +++ b/api/rate/rate_test.go @@ -24,7 +24,7 @@ func mockRequest(t *testing.T, l *Limiter, path string, headers http.Header) { // This test takes ~2 seconds to run func TestRatelimitReset(t *testing.T) { - l := NewLimiter() + l := NewLimiter("") headers := http.Header{} headers.Set("X-RateLimit-Remaining", "0") @@ -54,7 +54,7 @@ func TestRatelimitReset(t *testing.T) { // This test takes ~1 seconds to run func TestRatelimitGlobal(t *testing.T) { - l := NewLimiter() + l := NewLimiter("") headers := http.Header{} headers.Set("X-RateLimit-Global", "1.002") diff --git a/state/store_default.go b/state/store_default.go index f34393a..fcab776 100644 --- a/state/store_default.go +++ b/state/store_default.go @@ -459,7 +459,7 @@ func (s *DefaultStore) MessageSet(message *discord.Message) error { if message.Content != "" { m.Content = message.Content } - if message.EditedTimestamp != nil { + if message.EditedTimestamp.Valid() { m.EditedTimestamp = message.EditedTimestamp } if message.Mentions != nil {