mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-05 19:57:02 +00:00
discord: Add missing NumberOption MarshalJSON
This commit is contained in:
parent
5c4a989746
commit
c14e68ac77
|
@ -708,3 +708,15 @@ func (m *MentionableOption) MarshalJSON() ([]byte, error) {
|
|||
raw: (*raw)(m),
|
||||
})
|
||||
}
|
||||
|
||||
// MarshalJSON marshals NumberOption to JSON with the "type" field.
|
||||
func (n *NumberOption) MarshalJSON() ([]byte, error) {
|
||||
type raw NumberOption
|
||||
return json.Marshal(struct {
|
||||
Type CommandOptionType `json:"type"`
|
||||
*raw
|
||||
}{
|
||||
Type: n.Type(),
|
||||
raw: (*raw)(n),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ types=(
|
|||
ChannelOption
|
||||
RoleOption
|
||||
MentionableOption
|
||||
NumberOption
|
||||
)
|
||||
|
||||
for ((i = 0; i < ${#types[@]}; i++)); {
|
||||
|
|
Loading…
Reference in a new issue