File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,26 @@ type ComponentEmoji struct {
242
242
Animated bool `json:"animated,omitempty"`
243
243
}
244
244
245
+ // NewComponentEmoji creates a new ComponentEmoji with the provided name (for Unicode emojis)
246
+ func NewComponentEmoji (name string ) ComponentEmoji {
247
+ return ComponentEmoji {
248
+ Name : name ,
249
+ }
250
+ }
251
+
252
+ // NewCustomComponentEmoji creates a new ComponentEmoji with the provided id (for custom Discord emojis)
253
+ func NewCustomComponentEmoji (id snowflake.ID ) ComponentEmoji {
254
+ return ComponentEmoji {
255
+ ID : id ,
256
+ }
257
+ }
258
+
259
+ // WithAnimated returns a new ComponentEmoji with the provided animated flag
260
+ func (c ComponentEmoji ) WithAnimated (animated bool ) ComponentEmoji {
261
+ c .Animated = animated
262
+ return c
263
+ }
264
+
245
265
func NewActionRow (components ... InteractiveComponent ) ActionRowComponent {
246
266
return ActionRowComponent {
247
267
Components : components ,
You can’t perform that action at this time.
0 commit comments