How To Create A Discord Bot Without Coding UPDATED!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's going on guys welcome back to another tutorial today i'm gonna be showing you an updated version of how to make a scratch for discord bot without coding if you're new to this channel you may not know what scratch for discord is scratch for discord is a way to code a discord about with with drag and drop blocks really easy so if you want to get started by coding a discord but make sure to watch this video this is an updated video of the first video and this has been recommended a lot because recently especially with the new previews and everything there has been a lot of errors and you have to do a lot more things and the other one was just a plain slick in the default version of scratch for discord which didn't have much errors and anything so let's get started for this video i'm going to be using preview 454 but it should be the same thing with all of the previews unless you're using a special block that are that is not in 454 but it's pretty much the same for all previews so you just open scratch and then you can do whatever you want i'm not going to do actual coding i'm just going to import some examples so the first thing this is not really an error but it's just something that the users kind of forget to do or don't know that you have to do so when you go to download it this will be a download option and when you click on it it will download your bot but sometimes this option is grayed out it doesn't let you click on it and there's a few reasons for this so first there might be some ghost blocks some blocks that are just laying around like this these are called ghost blocks so there can't be any ghost blocks so if there are any ghost blocks you have to delete them and then it'll probably let you download it and if you have a lot of ghost blocks or you don't see any you can go to edit and click clear ghost blocks and then it deletes all of the ghost blocks and that this option is actually only in preview 454 but if you're on another preview you can just manually delete them and you can see there's still no download option and the second thing you have to do is go into the base category and drag in the connect to discord with token block and then inside here go to your discord developer portal go to bot and click copy token and go back to scratch for discord app and paste the token in so this is a required block if you don't have this it's not going to connect to your bot it has no way of knowing which bot to connect to so you need that to connect to your actual bot and then you can see this download option has come back so you click on download and then click on download again after it downloads make sure you have this file saved if you want to access it access it later so go into file and then click save and then choose your location that you want to save it in you can also go up to pre builds and click save pre-build as and then name it and then when you want to load it you can click load pre-build and select the what the thing that you named it as and then it will load it and after that we're done with the scratch for discord app so you can close that and click yes and then we're gonna have to go to file explorers and go to wherever you downloaded the scratch for discord file so i downloaded it in downloads and you'll see this untitled document.zip or it might be named whatever you named it as in the app right click it and click extract all and then click extract and then you can delete the dot zip document and you should see a normal folder called untitled document or whatever you named it as and inside this folder you should see four files dot replit blocks.xml bot.js and package.json next we're going to open your browser and go to the website replit.com and it might ask you to sign in if you haven't signed in already or created an account so make sure you create an account if you haven't already and log into that and once you're on this screen create a new ripplet so click this plus sign and click node.js i'm just going to name it as 4d tutorial and click the blue create ripple button and then you should be in this screen and you can and then you should be in this screen in the readme.md you can delete that you can delete all of the files actually so delete the index.js and the readme file if there is any readme file and click these three vertical dots right here and click upload folder and then click this folder and click upload click upload again and then you should see this folder appear here and click into the folder and you were gonna have to move some files out of the folder so drag the dot replica file over here and release so it will drag it out of the folder so it's not inside the folder anymore so drag all of them out everything except blocks.xml you don't really need that file so you can close the folder and then you should look like this and now it's pretty much done you can run but another step that you should do is install the latest version of npm and node.js so if you go into bot.js this is the main code for your bot if you scroll down you'll see all of the code you might relate to some of them so this is the cue end like when the key was finished for music this is the say command but we want to go to package.json and it says over here it says node update so copy npmi whatever this is and go until the quotation marks end and click ctrl c on your keyboard and then go into here make sure you're in the shell not your console make sure you're in the shell and right click on the empty space and click paste and then once these appear just click enter this might take a while because this is installing node.js 16 and then once you're done you might see a lot of new things pop up in your package.json the next one you're gonna look for node clean in your package.json and copy until the end of the parentheses and again go into the shell and paste it in and click enter this is just finishing it up this is also going to take a while so when it's done it might say something like this found six vulnerabilities five moderate one critical if it says that just type npm audit fix and press enter so this is going to fix the problems that means that it encountered some problems so it's fixing the problems right now and there when it finishes there's one last command we have to do it's npm i dash g npm at latest and press enter so what this is doing we just installed the node.js v16 which is currently the latest version and this one that we just did and pmi g and pm at latest this is installing the latest version of npm this is also going to take a while sometimes this might take a while or it might just take a few seconds for me it just took a few seconds right now so it says added 218 packages from 96 contributors in 23 point however many seconds and now it's basically done if you click run it's gonna do npm install again this is just replica it's just refreshing it's just updating the package configuration and then when it's done it might spam invites or cooldowns just gonna keep spamming cooldown but when it does that that's that's because of the cooldown packages you're gonna have like a cooldown thing if you use any of the cooldown blocks but if this happens that means it should be working so if i go into my bottas server i can see that my scratch for discord bot is online so if i do the command exclamation mark ping it will reply palm which was part of the code and if i do exclamation mark say hi it will say hi back which is also part of the code there's also some music commands so one last thing you can also do exclamation mark xp which is the default xp things at million exam you need 82 to jump to level one and if i do exclamation mark level if you are currently level zero which is the example another thing we should do is secure our bot token because this rebel is public right now so anyone can just come come on the ripple it and see your token and basically steal your whole bot to hide our token we go over here to secrets with the lock sign environment variables and scroll down to wherever your login code is so i'm going to do ctrl f and search for a login and there it is so that's the token of my test bot so in the key put token in all caps and in the value paste in the token from here that you just copied and click add new secret and then scroll down over here and enter your login make sure there's only parentheses and now quotation marks put process dot env dot token and then when we start it starts correctly the server is started and it logged into our token one last thing we have to do is we have to make the bot online 24 7 because right now if you click stop it'll stop the bot or if you even close this tab or close out of your window it will stop the block completely and go offline so for this you have to go into my discord server scratch for discord world which is currently halloween team and scroll up to the important category and click on the codes channel in the codes channel you will find a code for server.js file section and copy the thing that's in the block box and in your rebel click this button to add a new file and name the fileserver.js and type control v to paste the code in so go back to your bot.js scroll all the way in the top and go into your sync and make sure it's inside the async don't put it outside of dsync so go over here and create a new line by pressing enter and the code for the top of about.js section copy this code and paste it over there but i'm just going to type it but i'm just going to type it so it's const keep alive equals require dot slash server.js with a semicolon at the end that's just this code just copy and paste that over here so what this is doing it's creating a constant which is a bit kind of like a variable it's creating a variable named keep alive which is requiring server.js so whenever we do keep alive whenever we use the keep alive variable it's going to require the server.js file so just use the server.js file and then the last step scroll all the way to the bottom and go over here if there's no line over here if it's just like this just create a new line just make sure it's not in a event because this is in the music event and this semicolon is ending the music command event so make sure it's below that but above return s40 so put keep alive with a double parenthesis at the end which is also this and then make sure to click stop if it's already running and click run again and we got an error over here cannot find mario server.js did i make a typo i'll if i did this is a comma make sure it's a dot i made a typo but click run again and it should work so this time when you click run you should have this web view pop pop-up saying that your bot is alive so this is kind of creating a website if you go over here and copy the url and go to a new tab you can actually go to that url and create a website so now this is the last step for keeping it alive 24 7. go to uptimerobot.com make sure to register if you haven't already or click login if you already have an account once you're logged in go to your dashboard make sure you're on this screen i already have some other monitors that are from my other discord bots click add new monitor and from here choose https and the friendly name you can name it whatever you want i'm going to name it discord bot and in the url or ip go to here and copy the url and over here delete the https that's already there and then do control v to paste the url in there everything else can be left the same and click create new monitor and click it one more time and there should be a new monitor that pops up over here click close over here click this little link icon and it should say that your bot is alive that means you got the url and everything correct now you can just close uptime robot just make sure not to click stop if you click stop then the bot will actually stop but if you just scroll close out of the tab like this it will keep running forever and if i go back to discord into my bot test server you can see that the scratch for discord bot is still online so that's pretty much it for today's video if you're new to this channel again make sure to watch the other videos because scratch for discord has a lot of features and each of my videos goes over another feature new or old feature on how to do it so make sure to watch the rest of my videos to become a pro at scratch for discord coding and create your own really advanced discord bot and on that note make sure to like and subscribe and i'll see you on the next one [Music]
Info
Channel: Scratch For Discord Tutorials
Views: 1,087
Rating: undefined out of 5
Keywords: discord, discord bot, discord.js, codelyon, discord.js tutorials, how to make a discord bot without coding, how to create a discord bot without coding, js, javascript, javascript tutorials, discord.py, how to make a discord bot, how to create a discord bot, s4d, scratch for discord, scratch for discord tutorial, how to create a bot with scratch for discord
Id: C7Z3zyUsdy4
Channel Id: undefined
Length: 13min 48sec (828 seconds)
Published: Sun Oct 31 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.