Skip to content

Latest commit

 

History

History
37 lines (33 loc) · 1.25 KB

interceptor.md

File metadata and controls

37 lines (33 loc) · 1.25 KB
title author description download github_profile_url github_source_url npm_profile_url npm_source_url npm_i github_issue_url discord_server thumbnail software status auto ghcommentid layout
Interceptor
SnazzahDI
Intercepts outgoing requests. (WebSocket & HTTP Requests)
di-interceptor
DiscordInjections
true
673
product

Intercepts outgoing requests. (WebSocket & HTTP Requests)

Wiki

NOTE: This plugin does not intercept the main Discord websocket on startup.

##Intercepting WebSocket creations const interceptor = this.manager.get('Interceptor'); interceptor.on('websocket-intercepted', iee => { if(iee.ws.url.includes("dealer.spotify.com")) this.spotifyWS = iee; iee.on('data', this.spotifyData); });

##Intercepting HTTP requests const interceptor = this.manager.get('Interceptor'); interceptor.on('request-open', (url, method, iee) => { if(url.includes("spotify.com")) iee.on('data', this.handleSpotifyRequest); });