I am trying to run the node index.js to start my discord bot. I have tried almost everything i could. But it still shows: PS F:DISCORDBOTSBeta> node index.js node:internal/modules/cjs/loader:928 throw err; ^ Error: Cannot find module ‘F:DISCORDBOTSBetaindex.js’ at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15) at Function.Module._load (node:internal/modules/cjs/loader:769:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) at node:internal/main/run_main_module:17:47 { code: ‘MODULE_NOT_FOUND’, requireStack: [] ..
Category : discord
I want to make a Discord login, but want to check if he is in my Server so I wanted to do an API call using the oAuth2 code etc. here is the Request code: getGuildsRole(code, userId, guildId) { return new Promise(async (resolve, reject) => { console.clear(); const options = { method: ‘POST’ }; let ..
For a specific channel in my server, I want to make it so that a user can’t send two messages in a row. Here’s the code I got so far: client.on(‘message’, message => { if(message.guild.id != ‘123478291364192834’) return; if(message.channel.id != ‘432874912364123984’) return; let messageauthor = ” message.channel.messages.fetch({limit:2}).then(messages=>{ messages .forEach(message=>{ messageauthor = message.author.id }) }) if(messageauthor ..

I am trying to make an embed with only 2 columns. Whenever I delete the inline value it drops test3 field like I want. Then I keep inline: true on test4 field and it drops to another row. I tried making both test3 and test4 inline values false but the problem still exists. How can ..
I am trying to create a discord bot that will give an automatic roll to any new user who enters the site and it does not work (I am actually interested in this way that the code should work according to the roll ID because my rollers’ names are in a foreign language) I would ..
my Bot is playing the same audio File for joining and leaving the Voice Channel and i dont know how to solve it: client.on(‘voiceStateUpdate’, (oldMember, newMember) => { let newUserChannel = newMember.voiceChannel let oldUserChannel = oldMember.voiceChannel const voiceChannel = client.channels.cache.get(‘807305239941480543’) const Bot = "808042353477550090" if(oldUserChannel === undefined && newUserChannel !== undefined && oldMember.member.user.bot === false ..
Hey I want to make a tag system for my bot like Dyno. So e.g tag create [Name] [content] tag edit [tagName] [changes] tag delete [tagName] How can I do this. I know thats a huge questions so I dont expect you to answer it at all. So has anybody a good tutorial for me ..
Im having some issues getting the command to wait for the bot to dm the user before it kicks them, ive put in a wait 5 second function but it kicks well before 5 seconds is up Below is my code and error. its saying ‘wait’ isnt defined but ive looked here and used one ..
I am discord bot coder beginner! I would like to create a report command in my bot, but I don’t know how to 🙁 If someone knows the code for embed report msg with reason can you please help me and answer with it I would appreciate it so much! <3 Source: Ask Javascript..

Hi I am trying to use discord api to add the user to the guild when he login. But I am getting 401 Unauthorized and I am not sure why. This is my code: const data = new FormData(); data.append("client_id", CLIENT_ID); data.append("client_secret", CLIENT_SECRET); data.append("grant_type", "authorization_code"); data.append("redirect_uri", `http://localhost:3000/callback`); data.append("scope", "identify,guilds.join"); data.append("code", req.query.code); var response = await ..
Recent Comments