diff --git a/iface_copier_gen.go b/iface_copier_gen.go index 791d347f..cf5962c5 100644 --- a/iface_copier_gen.go +++ b/iface_copier_gen.go @@ -684,6 +684,19 @@ func (r *Role) copyOverTo(other interface{}) error { return nil } +func (s *StickerItem) copyOverTo(other interface{}) error { + var dest *StickerItem + var valid bool + if dest, valid = other.(*StickerItem); !valid { + return newErrorUnsupportedType("argument given is not a *StickerItem type") + } + dest.FormatType = s.FormatType + dest.ID = s.ID + dest.Name = s.Name + + return nil +} + func (u *User) copyOverTo(other interface{}) error { var dest *User var valid bool diff --git a/iface_deepcopier_gen.go b/iface_deepcopier_gen.go index 012eaa3d..6aa8f1d3 100644 --- a/iface_deepcopier_gen.go +++ b/iface_deepcopier_gen.go @@ -212,6 +212,12 @@ func (r *Role) deepCopy() interface{} { return cp } +func (s *StickerItem) deepCopy() interface{} { + cp := &StickerItem{} + _ = DeepCopyOver(cp, s) + return cp +} + func (u *User) deepCopy() interface{} { cp := &User{} _ = DeepCopyOver(cp, u) diff --git a/message.go b/message.go index 515dc69a..75b88786 100644 --- a/message.go +++ b/message.go @@ -139,6 +139,9 @@ type StickerItem struct { FormatType MessageStickerFormatType `json:"format_type"` } +var _ Copier = (*StickerItem)(nil) +var _ DeepCopier = (*StickerItem)(nil) + type MessageSticker struct { ID Snowflake `json:"id"` PackID Snowflake `json:"pack_id"`