marioparaschiv / nitro-sniper

🔫 A lightweight, fast and efficient discord nitro sniper, giveaway sniper & invite sniper.
820 stars 3.25k forks source link

[Bug] Getting this error on an unoccupied port #361

Closed Motzumoto closed 2 years ago

Motzumoto commented 2 years ago

Describe the bug

Im getting an error when it try to start the program on a port that has nothing on it

To Reproduce

I dont know how to reproduce this error

Expected behavior

It should just launch fine

Please provide your snipers settings.

settings="{
   tokens: {
      // Main Token (ex: Nz...)
      main: 'Main Token',
      // Alt Tokens (ex: Nz...)
      alts: [
         'Alt Token',
      ],
   },
   // The mode to run the sniper in. Options: main (only main account), alts (only alts), both
   mode: 'both',
   /*
      The status the accounts should be on.
      Options: online, dnd, idle, offline, default
      default means the status will not be modified.
   */
   status: {
      // The status the main account will have IF it's logged in
      main: 'default',
      // The status the logged in alts will have
      alts: 'default'
   },
   nitro: {
      // The amount of nitros needed to be sniped for the cooldown to activate
      max: 4,
      // Cooldown to activate after max nitro has been hit (in hours)
      cooldown: 10,
      dm: {
         /*
          * How long to wait before attempting to claim the nitro in DMs (in seconds)
          * This is to avoid suspicion when winning giveaways by slowing down the sniper from instantly sniping it.
          */
         delay: 10
      }
   },
   giveaway: {
      // Wether or not to activate the giveaway sniper (true/false)
      enabled: false,
      // Delay to react to the giveaway (in seconds)
      delay: 30,
      // DM the hoster on giveaway win (true/false)
      dm: true,
      // Messages to DM the host
      dmMessages: [
         'Hey, i won the giveaway.',
         'Could i redeem my prize?'
      ],
      // How long to wait to DM (in seconds)
      dmDelay: 25,
      // How long to wait between messages (in seconds)
      messageDelay: 2,
      // Blacklisted words for giveaway prizes
      blacklistedWords: [
         'bot',
         'test',
         'ban'
      ],
      // Only react to whitelisted giveaway prizes (true/false)
      whitelistOnly: false,
      // Whitelisted words for giveaway prizes
      whitelistedWords: [
         'nitro'
      ],
      // Blacklisted Server IDs to not snipe giveaways on
      blacklistedServers: [
         ''
      ],
      // Only snipe giveaways on whitelisted servers (true/false)
      whitelistServersOnly: false,
      whitelistedServers: [
        ''
      ]
   },
   invite: {
      // Wether or not to activate the invite sniper (true/false)
      enabled: false,
      delay: {
         // Minimum delay to join the server (in seconds)
         min: 10,
         // Maximum delay to join the server (in seconds)
         max: 20
      },
      members: {
         // The minimum member count the server should have
         min: 1500,
         // The maximum member count the server should have
         max: 50000
      },
      // The amount of joined invites needed for the cooldown to activate
      max: 10,
      // Cooldown to activate after max joined invites has been hit (in hours)
      cooldown: 6,
      // Wether to accept an invite on any other alt/account (depends on "mode") if the current alt has max servers (true/false)
      queue: true,
      // Wether to allow the main token to snipe invites ONLY if sniper mode is set to "both" (true/false)
      onlyAlts: true
   },
   webhook: {
      // URL to fire webhook to for notifications (ex: https://discord.com/api/webhooks/.../...)
      url: 'Webhook url',
      enabled: {
         // Fire webhook on invalid code (true/false)
         codeInvalid: false,
         // Fire webhook on already redeemed code (true/false)
         codeAlreadyRedeemed: false,
         // Fire webhook on sniped code (true/false)
         codeSuccess: true,
         // Fire webhook on giveaway enter (true/false)
         giveawayEntered: true,
         // Fire webhook on giveaway win (true/false)
         giveawayWin: true,
         // Fire webhook on invite join (true/false)
         inviteJoin: false,
         // Fire webhook on failure of sniping invite (true/false)
         inviteFail: false
      },
      mentionEveryone: {
         // Mention on invalid code (true/false)
         codeInvalid: false,
         // Mention on already redeemed code (true/false)
         codeAlreadyRedeemed: false,
         // Mention on sniped code (true/false)
         codeSuccess: true,
         // Mention on giveaway enter (true/false)
         giveawayEntered: false,
         // Mention on giveaway win (true/false)
         giveawayWin: true,
         // Mention on invite join (true/false)
         inviteJoin: false,
         // Mention on failure of sniping invite (true/false)
         inviteFail: false
      }
   }
}"

What platform are you seeing the problem on?

Local Computer, Other Platform

Relevant log output if applicable.

node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: listen EACCES: permission denied 0.0.0.0:69
    at Server.setupListenHandle [as _listen2] (node:net:1317:21)
    at listenInCluster (node:net:1382:12)
    at Server.listen (node:net:1469:7)
    at Function.listen (/home/ubuntu/LunarDev/nitro-sniper/node_modules/express/lib/application.js:618:24)
    at Dashboard.attachListeners (/home/ubuntu/LunarDev/nitro-sniper/src/lib/Dashboard.js:20:33)
    at Dashboard.start (/home/ubuntu/LunarDev/nitro-sniper/src/lib/Dashboard.js:14:10)
    at new Dashboard (/home/ubuntu/LunarDev/nitro-sniper/src/lib/Dashboard.js:9:10)
    at init (/home/ubuntu/LunarDev/nitro-sniper/src/index.js:50:23)
    at Object.<anonymous> (/home/ubuntu/LunarDev/nitro-sniper/src/index.js:106:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
Emitted 'error' event on Server instance at:
    at emitErrorNT (node:net:1361:8)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'EACCES',
  errno: -13,
  syscall: 'listen',
  address: '0.0.0.0',
  port: 69
}
Motzumoto commented 2 years ago

Having a dashboard for my use case isnt even necessary, can i somehow remove that functionality? I don't know javascript so i'll need a walk through, just an idea i had.

marioparaschiv commented 2 years ago

Then change the port. You can also just remove the code from the start function inside the dashboard file in src/lib/Dashboard.