Basic Command Handlers Discord Bot | Scratch For Discord

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so we did how to set up your bot on discord and we did how to update your about on discord now where i'm gonna teach you everything i know about command handlers so command handlers are just basic commands so for example this example uh if you want to import an example you can just click here and then click one of the examples a quick tip if you press example there is a ping pong command which is i already have this so yeah this is a ping pong command i wouldn't i wouldn't recommend doing this because if you haven't noticed most spots what they do they just make all of their commands command handlers even if they don't need the arguments so like if you will say anything after this so like ping uh whatever like if you for example if you do a typo if you type ping g like if you type g two times then it would still do the same thing i would really recommend doing that even like even if you don't need the arguments or if you don't want to do this each time by the way you can just do the command and blur to import these so you don't have to do uh these every time and then you can just edit the command and the blocks so and the arguments are it sets the arguments to whatever the person says after the command so this is the command and the argument is whatever is after the command but if you don't want to do the actual command handler you can also do i'm just going to import one to make it faster instead of if message content equals ping you can do starts with so that's basically the same thing if message content starts with exclamation mark so like that makes it so it doesn't have arguments but they can also say anything after the command if they want but i usually just do it this way but i'll just show you how to make a simple ping command with the commands on them so i'm gonna make my prefix this minus sign so yeah i'm just going to use the minus sign on each one and um some people what they do you can do when the is connected or uh yeah when the bot is connected uh set variable to uh the minus sign if you don't know what a variable is it like sets it to something so wherever you use that variable instead of saying the variable name it will set whatever the variable is set to so and then if you want you can do create text with then variable over here so like the i haven't created it but the variable over here and the command over here so like if you ever want to change the variable you can just change the variable in this one instead of doing it separately or in the future if you add something that the the variable is different in every server that you can set it but i'm not going to get into those right now so my group is going to be a minus sign and then ping so it replies um so let me just delete these blocks uh and then i'm gonna use embeds too message embed is all the way at the bottom of messages so make sure make sure you go into settings and check all of these so you can add everything to the embeds and the message will be create text with so and you can i'm going to add more lines a little more lines so the the first line is going to be pong and then i'm going to make it bold if you don't know even in normal discord you can do these things around your message to make it bold and one one of those things around the message to be italics and under others too i'm not gonna get in this right now so i'm just gonna make this ball and then i'm gonna add a new line and then it's gonna say bot ping and then it says the actual bot pink in base so and then add one more text saying m s and then close the bold i'm actually gonna actually have a better idea all right i'm just going to close the bolt over here and then there's going to be a space and i'll put this back tick and put another back stick over here because the back tick uh it makes it coats fun so if you just if you surround your message with the back ticks then it will make it like look like a in a box and if you do three back ticks and surround your message with three backpicks it's like a whole box and you can also add new lines if you do that if you deal with three backticks then oh i just did that but yeah you get you get it so it's a pong which is bold new line about ping which is bold and then the bot ping so like for example 42 ms so and that's gonna be in the box font for the code font it's called uh you can do say which is the actual example that's already pre-made um well it's already made so but i don't really like what they did with this and what what this is like uh you have the following content after say and then it reply like if you have two replies then it will reply this this and then it will make another message saying this but what most people do is you can do create text with and then you can say one text over here and then a variable over here or whatever you want but you don't even need a variable over here like um i'll just put i'll just put in the create text width delete this and i'll just make it like a buy like below it there would be a buy and then message out there so this is the arguments if you want you can also just put the variable arguments but yeah it's already made like this so like um this is better i'm pretty sure if you do it like just the arguments you can't put spaces so i'd recommend doing that make text from list arguments and i'm pretty sure that's in list yet here it is you have to do text from list and then i'm gonna add some arguments it would say whatever they said after the say command and then it would be about a bunch of new lines and like that and then text make it italics i'll actually make it italics and bold so it's alex and bald is three and then i'll put by and then put another one [Music] and then over here we can close the italics and uh bold uh you can also add colors over here oh this is the rgb uh this is the blending and then this is just the colors you can choose some colors over here and there's also a random color if you want i'm just gonna make this blue because that's kind of like the scratch for discord uh color i know my channel color speaking of my channel uh make sure to like the video if you enjoyed and yeah uh that's not it though so make sure you save this uh if if you don't know how to update your bot make sure you watch my last video so it's going to be like a youtube comment so if you do youtube another thing that you can actually do with bots and this is only unboxed so don't try this for yourself to see if it's true or not so and you can only do this in embeds too so you can actually make hyperlinks so like named links kind of so it would be like in this format uh the square brackets and then printed this so the square brackets would be the actual text so would be uh my youtube channel and then it would be the actual link in the parentheses so it'd be like a hyperlink and then i'll just change this text [Music] okay and then the color can be read for that one for youtube and you can send the title too if you want um and then the image the image is actually an image link so if you want to add an image you can um a footer is like the lower portion of the embed thumbnail is like um a small image like a small version of an image but it doesn't take up the home and bed pretty much it for the commanding animals that's pretty that's pretty much it then like basically but the next episode we're gonna be getting into more advanced commands like maybe some polls where like you can listen to the answer of like you can ask a question and then you can save the answer see whatever that person asks and then like random responses but uh before we end the video i'll just show you guys this code real quick i'll just enter my plot token right here make sure if you didn't watch my last video make sure to go watch that so it's because it shows how to uh save it and how to update your bot um and if the first video also shows how to make it 24 7 so like it doesn't stop whenever you close this but i'm not going to do it right now because i don't really need this bot to run 24 7 because it's just a test spot but if i click run over here then it should yeah well uh yeah it's one like if it doesn't see anything that means this one but if you do the keep alive things i said in the first video then they can make it 24 7 then it should say something i'll actually do that real quick so you guys can see so if you just press one and then yeah let's say scribbler is ready and then this thing would pop up so if you're going to discord [Music] make sure you guys wait a little after you turn the rebel on it actually um i don't know why but it takes a while to start up like i've been waiting for like uh two minutes now and now it's started up so if i do ping then there it is it says ping 89 voice i can do the same thing with say say hi it's going to be high and 5 million actually i'm going to for today's video next video is going to be moderation come in so like kick band clear up and then in the future there's also going to be some square filters so if you want to see that stay tuned for those in the future and i'll see you next time
Info
Channel: Scratch For Discord Tutorials
Views: 736
Rating: undefined out of 5
Keywords: discord, beluga, meme, memes, Beluga, discord mod, coding, javascript, scratch for discord, scratch, how to create a discord bot, bot, robot, how to create a discord bot without coding, discord.js, discord.py, mrbeast lol, why are you seeing this, stop looking, mrbeast, dream, minecraft
Id: bP8LRm1PI8o
Channel Id: undefined
Length: 12min 32sec (752 seconds)
Published: Fri Aug 13 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.