marioparaschiv / nitro-sniper

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

[Bug] invalid settings on local install #384

Closed mte0 closed 2 years ago

mte0 commented 2 years ago

Describe the bug

'invalid settings on...' local installation

To Reproduce

local installation steps

Expected behavior

should run sniper

Please provide your snipers settings.

tokens are shortened.

settings="{
   tokens: {
      // Main Token (ex: Nz...)
      main: 'mfa.vnnyFikWyK4weL2Uw',
      // Alt Tokens (ex: Nz...)
      alts: [
      "mfa.-jrRHoghKPZ2_4WyUFQ_Z0p0ka4bfrgfNP",
      "mfa.0-nryV3gTziblGus67FSNlsoHX-I1SpGUr",
      "mfa.0LqOLsiJmAIkg3VmQCdEskKPifxGKJXP",
      "mfa.1H58IzHlvy5GDPyfCP0ApivyqpCtPZJ"
   ],
   },
   // 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: 15,
      // Cooldown to activate after max nitro has been hit (in hours)
      cooldown: 3,
      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: 18
      },
      // A list of channel IDs to ignore when sniping nitro
      blacklistedChannels: [
         '',
      ]
   },
   giveaway: {
      // Wether or not to activate the giveaway sniper (true/false)
      enabled: true,
      // Delay to react to the giveaway (in seconds)
      delay: 49,
      // DM the hoster on giveaway win (true/false)
      dm: true,
      // Messages to DM the host
      dmMessages: [
         'yo bro i won the giveaway can u drop the code here?',
         'can i get my nitro here plz!'
      ],
      // How long to wait to DM (in seconds)
      dmDelay: 62,
      // How long to wait between messages (in seconds)
      messageDelay: 2,
      // Blacklisted words for giveaway prizes
      blacklistedWords: [
         'bot',
         'test',
         'ban',
         'kick',
         'react'
      ],
      // Only react to whitelisted giveaway prizes (true/false)
      whitelistOnly: true,
      // Whitelisted words for giveaway prizes
      whitelistedWords: [
         'nitro',
         'discordnitro'
      ],
      // Blacklisted Server IDs to not snipe giveaways on
      blacklistedServers: [
         ''
      ],
      // Only snipe giveaways on whitelisted servers (true/false)
      whitelistServersOnly: false,
      whitelistedServers: [
      ''
      ],
      prizeLength: {
         // The minimum character length of the prize (null = infinite)
         min: 4,
         // The maximum character length of the prize (null = infinite)
         max: null
      }
   },
   invite: {
      // Wether or not to activate the invite sniper (true/false)
      enabled: false,
      delay: {
         // Minimum delay to join the server (in seconds)
         min: 1000,
         // Maximum delay to join the server (in seconds)
         max: 6000
      },
      members: {
         // The minimum member count the server should have
         min: 8000,
         // The maximum member count the server should have
         max: 50000
      },
      // The amount of joined invites needed for the cooldown to activate
      max: 3,
      // Cooldown to activate after max joined invites has been hit (in hours)
      cooldown: 8,
      // 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: 'https://discord.com/api/webhooks/968050415155429376/XXX',
      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: true
      },
      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
      }
   },
   // Whether to log all console messages to file (true/false)
   log: true
}"

What platform are you seeing the problem on?

Local Computer

Relevant log output if applicable.

Invalid settings, please visit the FAQ for more information: https://github.com/localip/nitro-sniper#faq. Exiting process...
Craftzman7 commented 2 years ago

You have an invalid config. This is not a bug.

mte0 commented 2 years ago

Thank you, I understand what the error said, but I'm not sure as to where the error in the config is, I've followed what similar issues have said to help fix, but no success.

Craftzman7 commented 2 years ago

You have an invalid type on a value or your JSON5 is invalid. I'd recommend putting it in a JSON5 validator. @localip you're good to close this.

mte0 commented 2 years ago

its for a .env, not a .json tho