Craftzman7 / nitro-sniper

This repo is used for pull requests
0 stars 0 forks source link

[Bug] 'MODULE_NOT_FOUND' error #4

Closed mbappedr0 closed 2 years ago

mbappedr0 commented 2 years ago

Describe the bug

I went to try to connect my bot through the replit and it gave this error, I configured everything right

To Reproduce

when trying to turn on the bot this error appears on the console

Expected behavior

the bot was supposed to start but it always gives this error

Please provide your snipers settings.

{
   tokens: {
      // Main Token (ex: Nz...)
      main: 'I removed my token because I won't make it public',
      // Alt Tokens (ex: Nz...)
      alts: [
         '',
      ],
   },
   // 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: 'online',
      // The status the logged in alts will have
      alts: 'online'
   },
   nitro: {
      // The amount of nitros needed to be sniped for the cooldown to activate
      max: 2,
      // Cooldown to activate after max nitro has been hit (in hours)
      cooldown: 24,
      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
      },
      // 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: 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: [
        ''
      ],
      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: 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,
      // Whether to accept an invite on any other alt/account (depends on "mode") if the current alt has max servers (true/false)
      queue: true,
      // Whether 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: '',
      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
      }
   },
   // Whether to log all console messages to file (true/false)
   log: true
}

What platform are you seeing the problem on?

Repl.it

Relevant log output if applicable.

 npm run start

> nitro-sniper@1.5.9 start
> node .

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'discord.js'
Require stack:
- /home/runner/nitro-sniper-1/src/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
 npm run start

> nitro-sniper@1.5.9 start
 npm run start
 npm run start

> nitro-sniper@1.5.9 start
> node .

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'discord.js'
Require stack:
- /home/runner/nitro-sniper-1/src/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/runner/nitro-sniper-1/src/index.js:1:36)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/runner/nitro-sniper-1/src/index.js' ]
}
exit status 1

github-actions[bot] commented 2 years ago

You have an invalid config, please do not open issues for this. Auto-closing this issue.

mbappedr0 commented 2 years ago

my problem is not solved

mbappedr0 commented 2 years ago

please help me to fix this problem