@alemonjs/discord
Advanced tools
+1
-1
@@ -91,3 +91,3 @@ import { sendchannel, senduser } from './send.js'; | ||
| } | ||
| void client.interactionsCallback(event.id, event.token, '正在处理您的请求...'); | ||
| void client.interactionsCallbackEphemeral(event.id, event.token, '正在处理您的请求...'); | ||
| }); | ||
@@ -94,0 +94,0 @@ client.on('MESSAGE_UPDATE', event => { |
+6
-1
@@ -147,6 +147,11 @@ import FormData from 'form-data'; | ||
| }>; | ||
| interactionsCallback(id: string, token: string, content: string): Promise<any>; | ||
| interactionsCallback(id: string, token: string, data: { | ||
| type: number; | ||
| data: any; | ||
| }): Promise<any>; | ||
| interactionsCallbackEphemeral(id: string, token: string, content: string): Promise<any>; | ||
| interactionsCallbackMessage(id: string, token: string, messageData: any): Promise<any>; | ||
| interactionsCallbackForm(id: string, token: string, formData: any): Promise<any>; | ||
| interactionsDeferred(id: string, token: string): Promise<any>; | ||
| interactionsCallbackModal(id: string, token: string, modalData: any): Promise<any>; | ||
| interactionsFollowup(application_id: string, token: string, messageData: any): Promise<any>; | ||
@@ -153,0 +158,0 @@ interactionsFollowupForm(application_id: string, token: string, formData: any): Promise<any>; |
+19
-2
@@ -829,10 +829,17 @@ import FormData from 'form-data'; | ||
| } | ||
| interactionsCallback(id, token, content) { | ||
| interactionsCallback(id, token, data) { | ||
| return this.request({ | ||
| method: 'POST', | ||
| url: `/interactions/${id}/${token}/callback`, | ||
| data | ||
| }); | ||
| } | ||
| interactionsCallbackEphemeral(id, token, content) { | ||
| return this.request({ | ||
| method: 'POST', | ||
| url: `/interactions/${id}/${token}/callback`, | ||
| data: { | ||
| type: 4, | ||
| data: { | ||
| content: content, | ||
| content, | ||
| flags: 64 | ||
@@ -872,2 +879,12 @@ } | ||
| } | ||
| interactionsCallbackModal(id, token, modalData) { | ||
| return this.request({ | ||
| method: 'POST', | ||
| url: `/interactions/${id}/${token}/callback`, | ||
| data: { | ||
| type: 9, | ||
| data: modalData | ||
| } | ||
| }); | ||
| } | ||
| interactionsFollowup(application_id, token, messageData) { | ||
@@ -874,0 +891,0 @@ return this.request({ |
+1
-3
@@ -204,5 +204,3 @@ import { createResult, ResultCode } from 'alemonjs'; | ||
| } | ||
| const res = components.length > 0 || embedData | ||
| ? await client.channelsMessages(channelId, payload) | ||
| : await client.channelsMessagesForm(channelId, payload); | ||
| const res = components.length > 0 || embedData ? await client.channelsMessages(channelId, payload) : await client.channelsMessagesForm(channelId, payload); | ||
| return [createResult(ResultCode.Ok, '完成', res)]; | ||
@@ -209,0 +207,0 @@ } |
+1
-1
| { | ||
| "name": "@alemonjs/discord", | ||
| "version": "2.1.15", | ||
| "version": "2.1.16", | ||
| "description": "discord platform connection", | ||
@@ -5,0 +5,0 @@ "author": "lemonade", |
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
358356
0.19%4331
0.46%