mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-03 10:47:00 +00:00
Utils: allow inheritance for custom types
This commit is contained in:
parent
bc188140f0
commit
dafda812dd
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue