x
This commit is contained in:
		
							parent
							
								
									68cf1105c1
								
							
						
					
					
						commit
						75620ee7ea
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		|  | @ -39,7 +39,10 @@ export function init(options: DeploySlashInitOptions): void { | |||
|     request: Request | ||||
|   }): Promise<void> => { | ||||
|     try { | ||||
|       const d = await client.verifyFetchEvent(evt) | ||||
|       const d = await client.verifyFetchEvent({ | ||||
|         respondWith: (...args: any[]) => evt.respondWith(...args), | ||||
|         request: evt.request, | ||||
|       }) | ||||
|       if (d === false) { | ||||
|         await evt.respondWith( | ||||
|           new Response('Not Authorized', { | ||||
|  | @ -51,6 +54,7 @@ export function init(options: DeploySlashInitOptions): void { | |||
| 
 | ||||
|       if (d.type === InteractionType.PING) { | ||||
|         await d.respond({ type: InteractionResponseType.PONG }) | ||||
|         client.emit('ping') | ||||
|         return | ||||
|       } | ||||
| 
 | ||||
|  |  | |||
|  | @ -385,6 +385,7 @@ const decoder = new TextDecoder('utf-8') | |||
| export type SlashClientEvents = { | ||||
|   interaction: [Interaction] | ||||
|   interactionError: [Error] | ||||
|   ping: [] | ||||
| } | ||||
| 
 | ||||
| /** Slash Client represents an Interactions Client which can be used without Harmony Client. */ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue