Sign in to follow this  
cab

Discord Gift Generator .js Script

Recommended Posts

[hide]

1) Go to https://discordapp.com/developers/applications/ and "Create An Application"

2) It will say Name and in that text box states "My Application". You may change this name to whatever you'll like.

3) Copy your CLIENT ID that is imprinted below the Name textbox. It's a series of numbers if you don't know what it is. If you want to mess around with the picture and description go ahead.

4) In the sidebar click on Bot, it'll have a picture of a jigsaw puzzle next to it. Just click that and press Add Bot. Confirm it with "Yes, do it!". All you need from here is the Token. Underneath the username, (what your bot's username will be.e.g Errors#3760 [Errors is the "Name"]) there is TOKEN in bold with "Click to reveal token" in a hyperlink format. Just underneath it is copy. Press that. DO NOT GIVE THIS OUT SINCE ITS IMPORTANT. Once you've done that, add it to a text file along side with your client id.

Place the bot into your server by replacing [iD] in this link with your CLIENT ID. Follow the on screen instructions, I'm assuming you're smart enough to do it yourself.

https://discordapp.com/oauth2/authorize?&client_id=[iD]&scope=bot&permissions=8

 

You're done here, now to get to the coding side.

1) Go to glitch.com, I'm not sure if they ask for you to log in. If they do, simply make a github account and connect it to glitch.

2) Top right it says "New Project" click that and press "hello-express".

3) Let your files load up. Once it has, ignore everything and click on server.js that's in the sidebar menu on the left side. Remove everything that's in server.js (all the text that appears in the middle of the screen) and replace it with the code given. Remember to add var x; before client.on("ready")

4) Now you're basically done. But one last thing to make the system work. Rememebr your TOKEN that you saved and I said don't give to anyone? Replace that inside the last line client.login("YOURTOKENHERE") with your token. Remove the one thats already there.

Ok so here the code .

const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Started bot ${client.user.tag}!`);
});
client.on('message', message => {
if (message.content === 'gift') {
   message.reply('Generating gift links...');
   setInterval(function() {
     var links = [];
     for (x = 0; x < 50; x++) {
       var used = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
       var link = "https://discord.gift/";
       for (var y = 0; y < 16; y++) {
         link += used.charAt(Math.floor(Math.random() * used.length));
       }
       links.push(link);
     }
     message.channel.send(links.join(" "));
   }, 3600);
}
});
 

[/hide]

THE BOT COMMAND IS `gift`

Share this post


Link to post
Share on other sites

same here, let me test this baby

Share this post


Link to post
Share on other sites

thanks fam!

Share this post


Link to post
Share on other sites

interesting let me look if this is real

Share this post


Link to post
Share on other sites

Where is client.login("YOURTOKENHERE") in that code?

Share this post


Link to post
Share on other sites

ty for sharing this one :) lemme see does it work

Share this post


Link to post
Share on other sites

Wonder how this works nice share though

Share this post


Link to post
Share on other sites

thx bro i love u

Share this post


Link to post
Share on other sites

 

THE BOT COMMAND IS `gift`

 

thanks for share man  :fiesta:

Share this post


Link to post
Share on other sites

 

THE BOT COMMAND IS `gift`

 

Awesome even tho this has been made many times

Share this post


Link to post
Share on other sites

Thanks fam!

Share this post


Link to post
Share on other sites

i don't know if is the same the before but, i'll see

 

~ it's just me being retarded or i can't load the page on glitch.com ?

 

                     2 edit ~ i'm having this erros - Please someone help 

 

module.js:550

6:05 AM

 

 

   throw err;

6:05 AM

 

 

   ^

6:05 AM

 

 

 

6:05 AM

 

 

Error: Cannot find module 'discord.js'

6:05 AM

 

 

   at Function.Module._resolveFilename (module.js:548:15)

6:05 AM

 

 

   at Function.Module._load (module.js:475:25)

6:05 AM

 

 

   at Module.require (module.js:597:17)

6:05 AM

 

 

   at require (internal/module.js:11:18)

6:05 AM

 

Jump to

at Object. (/app/server.js:1:79)

6:05 AM

 

 

   at Module._compile (module.js:653:30)

6:05 AM

 

 

   at Object.Module._extensions..js (module.js:664:10)

6:05 AM

 

 

   at Module.load (module.js:566:32)

6:05 AM

 

 

   at tryModuleLoad (module.js:506:12)

6:05 AM

 

 

[align=center]   at Function.Module._load (module.js:498:3)

[/align]

Share this post


Link to post
Share on other sites

Like your type guys. Your are the best

Share this post


Link to post
Share on other sites

I'll actually try this.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this