cordo 2.9.2 → 2.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -52,7 +52,8 @@ export function button() {
|
|
|
52
52
|
},
|
|
53
53
|
disabled(disabled = true, opts?: { greyOut?: boolean }) {
|
|
54
54
|
disabledVal = disabled
|
|
55
|
-
if (opts?.greyOut)
|
|
55
|
+
if (disabled && opts?.greyOut)
|
|
56
|
+
styleVal = ButtonStyle.Secondary
|
|
56
57
|
return out
|
|
57
58
|
},
|
|
58
59
|
onClick: (...funct: CordoFunctRun) => {
|
package/src/core/gateway.ts
CHANGED
|
@@ -80,12 +80,20 @@ export namespace CordoGateway {
|
|
|
80
80
|
return null
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
if (!internals.answered) {
|
|
84
|
+
if (payload)
|
|
85
|
+
return apiRequest('post', `/interactions/${i.id}/${i.token}/callback`, payload)
|
|
86
|
+
|
|
87
|
+
if (i.type === InteractionType.ApplicationCommand)
|
|
88
|
+
return apiRequest('post', `/interactions/${i.id}/${i.token}/callback`, { type: InteractionResponseType.DeferredChannelMessageWithSource })
|
|
89
|
+
|
|
90
|
+
if (i.type === InteractionType.MessageComponent)
|
|
91
|
+
return apiRequest('post', `/interactions/${i.id}/${i.token}/callback`, { type: InteractionResponseType.DeferredMessageUpdate })
|
|
92
|
+
}
|
|
93
|
+
|
|
83
94
|
if (!payload)
|
|
84
95
|
return null
|
|
85
96
|
|
|
86
|
-
if (!internals.answered)
|
|
87
|
-
return apiRequest('post', `/interactions/${i.id}/${i.token}/callback`, payload)
|
|
88
|
-
|
|
89
97
|
const { type, data } = payload
|
|
90
98
|
if (!type || !data)
|
|
91
99
|
return null
|