mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-05 11:46:58 +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 ================================
|
||||||
|
|
||||||
// Seconds is the option type for discord.Seconds.
|
// Seconds is the option type for discord.Seconds.
|
||||||
type Seconds *discord.Seconds
|
type Seconds = *discord.Seconds
|
||||||
|
|
||||||
// ZeroSeconds are 0 Seconds.
|
// ZeroSeconds are 0 Seconds.
|
||||||
var ZeroSeconds = NewSeconds(0)
|
var ZeroSeconds = NewSeconds(0)
|
||||||
|
@ -16,7 +16,7 @@ func NewSeconds(s discord.Seconds) Seconds { return &s }
|
||||||
// ================================ Color ================================
|
// ================================ Color ================================
|
||||||
|
|
||||||
// Color is the option type for discord.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.
|
// NewString creates a new Color with the value of the passed discord.Color.
|
||||||
func NewColor(s discord.Color) Color { return &s }
|
func NewColor(s discord.Color) Color { return &s }
|
||||||
|
|
Loading…
Reference in a new issue