Utils: allow inheritance for custom types

This commit is contained in:
mavolin 2020-05-11 23:32:48 +02:00
parent bc188140f0
commit dafda812dd
No known key found for this signature in database
GPG Key ID: D8681218EDF216DF
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import "github.com/diamondburned/arikawa/discord"
// ================================ Seconds ================================
// Seconds is the option type for discord.Seconds.
type Seconds *discord.Seconds
type Seconds = *discord.Seconds
// ZeroSeconds are 0 Seconds.
var ZeroSeconds = NewSeconds(0)
@ -16,7 +16,7 @@ func NewSeconds(s discord.Seconds) Seconds { return &s }
// ================================ Color ================================
// Color is the option type for discord.Color.
type Color *discord.Color
type Color = *discord.Color
// NewString creates a new Color with the value of the passed discord.Color.
func NewColor(s discord.Color) Color { return &s }