Discord Slash Commands WITHOUT CODING! | Scratch For Discord

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's going on guys welcome back to another video in this video we're going to be working on slash commands so and we're in this video we're going to be using preview 425 so make sure your scratch server is set to preview four to five and if you don't know what i'm saying like about previews and scratch servers and everything and this new scratch for discord app make sure to watch the last video because in the beginning i explain everything about those so make sure your server is set to 425 and click on open scratch and then slash commands we're going to be registering them first so you have to actually make the slash commands first so click on register slash command in the top and that button and then it's gonna open chrome and it's gonna go to a website made by scratch for discord and then you're it's going to ask you to like sign in to a bot with like a a decline the information and everything so uh just go to your discord developer portal and then press your bot so i'm using my scratch test spot now so go to bot and then and go to all oval two and click copy token paste it in the i mean not token client id and paste it in the client id section and in the client secret do uh just copy that and then put in the the client secret and then make sure to not uh reveal this to everybody anybody so i'm revealing it now i'm just gonna regenerate it after the video is over and the guild id guild means server if you don't know um a guild id is a server id so if you leave this part blank then it will be a global slash come in so if you if you're making a public bot for like other people to use then just leave this blank but if you're using it for your own like server bot or you just want to test it make sure to right click your server icon and click copy id and then put in the guild id over here actually i'm going to do the record server so and then if if you do if you leave it blank don't expect it to come up right away it's because and if it if it's global then it takes up to an hour to register so just click submit but when you have all of those in so you have to click a bot like in the awards 2 section this is where you click your create your invite link like whenever you create an invite link so select bot and make sure it's selected applications dot commands and then select any uh permissions and just read it to the server and just do the record server and then authorize so you're currently meaning the slash commands of scratch for discord which is my test spot name and on guild this guild so and then you can click create a new command so i'm going to do a test command so this is going to be the command name so you can it's going to be slash name so i'm going to make it test so it's going to be slash test and description is going to be a test command okay and then click create and then it takes a few seconds to load and then if you go into the command you have some options some sub commands sub command groups and command parameters so if i type slash in here there it is so there it is scratch for discord and their slash test a test command and then if i do it right now it's not gonna do anything it's just gonna say an error and then it's not gonna work and i'll show you parameters too so you can create a new parameter um a string is going to be test string i can't have spaces so i'll just have no spaces and the option is going to be a description is going to be a test string so if you click create then you can do slash and it's going to be test and then the option is going to be test string so you can type whatever you want over here this is a test and then click tab and then if you do it and then it will do that right now it won't do anything anyway but you can see you did test string test ring this is a test and then you can also make it required or not but i'm gonna delete it delete that for now and [Music] okay so let's just go into this stretch for discord and then we can do when a slash command is received so this last command is received if option name i mean interaction name equals and this is going to be your interaction name so if you go back to slash command gui this is just going to be this whatever whatever the command name is that's the it's the same thing as interaction name so you can do i'm going to add another if and also in the current command parameters another thing you can do is add a new choice so if you have no choices then the user will be able to type whatever they want but if you add a new choices they'll have to choose which one so they can do um option one just to make them shorter but i'm just gonna keep it the same this is what the value that will be passed to you that this is the value sent to you and then the what the user will see so you can do if i'll actually show you that so test string and then you can choose either one so in this one you can't you you can't just type whatever you want it'll just be it'll just say an error and then so i'm gonna do some lsips and ifs so there were three options so if uh get string option name option name will be the option name so test string test string if get option name test string equals then you can do the options so option one sometimes it's not going to let you put these in like for example if you do true or false a boolean for example you're gonna have to set it to a variable so you can just create a variable and i'm just gonna use test string and then at the beginning you can do set test string to and then get the string option name test string so instead of using this you would use the variable you would just put this variable in here but right now we're not doing anything like that so it's fine so we can reply we can reply for this you chose first option well actually we can't do reply we have to do in interaction reply and ephemeral ephemeral is if if it's only visible to the person who did the command so you might see well it's it's the thing we just saw so if you do a command for example it's going to be like it's going to be like this like only you can see this it's going to look like this blue style and everything so if you want it to be like that you can set this to true from row an interruption will apply all the you chose first option and then fmro will be true for this one and right now ignore the row because that will be buttons and the buttons will be in a future tutorial [Music] like if you wanted for example a band command you can do when a slash command is received if interaction name equals van i'm just showing like what you would do in an actual command you would put all the ifs of course like if the member message out there has permission to ban members and then you could just put kick i mean band member reason and then in this you can actually make a separate parameter which is reason so you would it would just be string because it's test and the option name would be reason and then it would be why you are banning this member and then you could create it but i'm just showing it so and then the reason would be just you would do get string option name reason and it can also be a user so you can be a type user so for for the band member the actual number would be get user option name member or whatever you name it and in you might have noticed in stretch for discord there's user and member so there's actually a difference in member it's like it's in the server like you can at mention that it's also some people also call it mentionable so you can actually look at someone but a user is like a user in all of discord so you can you can do an actual user but over here for some reason there's no member option so you're gonna have to do user anyway uh i don't know if that's a mistake or there's some reason behind it but there's no user option in the scratch for discord register and you can demand member with just the option name member or user whatever you call it and it would just interaction reply it would just reply like that number has been banned of course you're gonna like put it in more detail the moderation commands part two it's gonna have slow mode purge and it will have mute so that's gonna be in one of the next videos i'm not sure in which video and if you want me to do buttons make sure to comment it because i'm not sure how much of you will use buttons but i think i will do it if enough of you want it so and then the moderation commands part 2 will come soon so that's that's it for today's video and i'll see you next time and also make sure to join my discord server where you can ask questions if you have any questions like if you're having any viewers in red lit or anything see you next time
Info
Channel: Scratch For Discord Tutorials
Views: 790
Rating: undefined out of 5
Keywords: discord.js, discord bot, discord bot tutorial, discord, discord memes, discord.py, discord.js tutorial, discord.js bot tutorial, s4d, scratch for discord, discord movie, discord song, how to code discord bot, javascript, slash, slash commands, discord slash commands, how to make discord bot without coding, how to make discord bot without
Id: 15hc3h4ZH18
Channel Id: undefined
Length: 12min 28sec (748 seconds)
Published: Mon Aug 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.