HananJ123
HananJ123
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
const { createWriteStream } = require('node:fs');
const { Client, GatewayIntentBits, Partials, MessageAttachment, Collection } = require('discord.js');
const sleep = require('util').promisify(setTimeout);
const {fs, existsSync, mkdirSync, readdirSync} = require("fs");

const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.MessageReactions
],
});
const { createWriteStream } = require('node:fs');
const { Client, GatewayIntentBits, Partials, MessageAttachment, Collection } = require('discord.js');
const sleep = require('util').promisify(setTimeout);
const {fs, existsSync, mkdirSync, readdirSync} = require("fs");

const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.MessageReactions
],
});
error:
throw new DiscordjsRangeError(ErrorCodes.BitFieldInvalid, bit);
^

RangeError [BitFieldInvalid]: Invalid bitfield flag or number: undefined.
at IntentsBitField.resolve (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\util\BitField.js:174:11)
at H:\Bot Making\HE BOT V2\node_modules\discord.js\src\util\BitField.js:168:35
at Array.map (<anonymous>)
at IntentsBitField.resolve (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\util\BitField.js:168:18)
at new BitField (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\util\BitField.js:33:38)
at new IntentsBitField (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\util\IntentsBitField.js:9:1)
at Client._validateOptions (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\client\Client.js:514:25)
at new Client (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\client\Client.js:80:10)
at Object.<anonymous> (H:\Bot Making\HE BOT V2\index.js:6:16)
at Module._compile (node:internal/modules/cjs/loader:1369:14) {
code: 'BitFieldInvalid'
}
throw new DiscordjsRangeError(ErrorCodes.BitFieldInvalid, bit);
^

RangeError [BitFieldInvalid]: Invalid bitfield flag or number: undefined.
at IntentsBitField.resolve (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\util\BitField.js:174:11)
at H:\Bot Making\HE BOT V2\node_modules\discord.js\src\util\BitField.js:168:35
at Array.map (<anonymous>)
at IntentsBitField.resolve (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\util\BitField.js:168:18)
at new BitField (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\util\BitField.js:33:38)
at new IntentsBitField (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\util\IntentsBitField.js:9:1)
at Client._validateOptions (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\client\Client.js:514:25)
at new Client (H:\Bot Making\HE BOT V2\node_modules\discord.js\src\client\Client.js:80:10)
at Object.<anonymous> (H:\Bot Making\HE BOT V2\index.js:6:16)
at Module._compile (node:internal/modules/cjs/loader:1369:14) {
code: 'BitFieldInvalid'
}
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
okay ill do it again
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
already did that
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
I cant update somehow
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
npm ERR! [Error: EPERM: operation not permitted, mkdir 'H:\Bot Making\HE BOT V2\node_modules\@discordjs\builders\node_modules\discord-api-types'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'H:\\Bot Making\\HE BOT V2\\node_modules\\@discordjs\\builders\\node_modules\\discord-api-types'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: C:\Users\jabba\AppData\Local\npm-cache\_logs\2024-05-09T20_16_13_013Z-debug-0.log
npm ERR! [Error: EPERM: operation not permitted, mkdir 'H:\Bot Making\HE BOT V2\node_modules\@discordjs\builders\node_modules\discord-api-types'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'H:\\Bot Making\\HE BOT V2\\node_modules\\@discordjs\\builders\\node_modules\\discord-api-types'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: C:\Users\jabba\AppData\Local\npm-cache\_logs\2024-05-09T20_16_13_013Z-debug-0.log
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'H:\\Bot Making\\HE BOT V2\\node_modules\\@discordjs\\builders',
npm WARN cleanup [Error: EPERM: operation not permitted, lstat 'H:\Bot Making\HE BOT V2\node_modules\@discordjs\builders'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'lstat',
npm WARN cleanup path: 'H:\\Bot Making\\HE BOT V2\\node_modules\\@discordjs\\builders'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'H:\\Bot Making\\HE BOT V2\\node_modules\\discord.js',
npm WARN cleanup [Error: EPERM: operation not permitted, lstat 'H:\Bot Making\HE BOT V2\node_modules\discord.js'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'lstat',
npm WARN cleanup path: 'H:\\Bot Making\\HE BOT V2\\node_modules\\discord.js'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'H:\\Bot Making\\HE BOT V2\\node_modules\\@discordjs\\rest\\node_modules',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'H:\Bot Making\HE BOT V2\node_modules\@discordjs\rest\node_modules\@discordjs'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'H:\\Bot Making\\HE BOT V2\\node_modules\\@discordjs\\rest\\node_modules\\@discordjs'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path H:\Bot Making\HE BOT V2\node_modules\@discordjs\builders\node_modules\discord-api-types
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'H:\Bot Making\HE BOT V2\node_modules\@discordjs\builders\node_modules\discord-api-types'
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'H:\\Bot Making\\HE BOT V2\\node_modules\\@discordjs\\builders',
npm WARN cleanup [Error: EPERM: operation not permitted, lstat 'H:\Bot Making\HE BOT V2\node_modules\@discordjs\builders'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'lstat',
npm WARN cleanup path: 'H:\\Bot Making\\HE BOT V2\\node_modules\\@discordjs\\builders'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'H:\\Bot Making\\HE BOT V2\\node_modules\\discord.js',
npm WARN cleanup [Error: EPERM: operation not permitted, lstat 'H:\Bot Making\HE BOT V2\node_modules\discord.js'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'lstat',
npm WARN cleanup path: 'H:\\Bot Making\\HE BOT V2\\node_modules\\discord.js'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'H:\\Bot Making\\HE BOT V2\\node_modules\\@discordjs\\rest\\node_modules',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'H:\Bot Making\HE BOT V2\node_modules\@discordjs\rest\node_modules\@discordjs'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'H:\\Bot Making\\HE BOT V2\\node_modules\\@discordjs\\rest\\node_modules\\@discordjs'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path H:\Bot Making\HE BOT V2\node_modules\@discordjs\builders\node_modules\discord-api-types
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'H:\Bot Making\HE BOT V2\node_modules\@discordjs\builders\node_modules\discord-api-types'
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
ik that
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
Trying to convert my old codes
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
I havent been coding for over 2 years
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
alright ill handle that
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
ill update that
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
it says 13.17
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
it is the full code what do you need more?
28 replies
DIAdiscord.js - Imagine an app
Created by HananJ123 on 5/9/2024 in #djs-questions
Intents
const { Client, GatewayIntentBits, Partials, MessageAttachment, Collection, Discord } = require('discord.js');
const { Client, GatewayIntentBits, Partials, MessageAttachment, Collection, Discord } = require('discord.js');
28 replies