You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Bind function to all components with matching custom ids. App will automatically run bound function whenever receiving component interaction with matching custom id.
returnerrors.New("client is no longer in initialization state (avoid editing client's internals after it launches)")
48
+
}
49
+
50
+
for_, ID:=rangecustomIDs {
51
+
_, exists:=client.components[ID]
52
+
ifexists {
53
+
returnerrors.New("client already has registered \""+ID+"\" component (custom id already in use)")
54
+
}
55
+
}
56
+
57
+
for_, ID:=rangecustomIDs {
58
+
client.components[ID] =fn
59
+
}
60
+
61
+
returnnil
62
+
}
63
+
64
+
// Bind function to modal with matching custom id. App will automatically run bound function whenever receiving modal interaction with matching custom id.
returnerrors.New("client is no longer in initialization state (avoid editing client's internals after it launches)")
68
+
}
69
+
70
+
_, exists:=client.modals[customID]
71
+
ifexists {
72
+
returnerrors.New("client already has registered \""+customID+"\" modal (custom id already in use)")
73
+
}
74
+
75
+
client.modals[customID] =fn
76
+
returnnil
77
+
}
78
+
44
79
// Sync currently cached slash commands to discord API. By default it'll try to make (bulk) global update (limit 100 updates per day), provide array with guild id snowflakes to update data only for specific guilds.
45
80
// You can also add second param -> slice with all command names you want to update (whitelist). There's also third, boolean param that when = true will reverse wishlist to work as blacklist.
0 commit comments