adding a bot to discord  - the way to have a Discord Bot examine messages and respond returned

broken image

 

 

And tells you precisely what you can do. correct so essentially it will soak up. some  style of occasion right so on the development. of a message right so when the bot see. the message correct we're going to do a little. form of we will perform a little kind of. operate and shall we do anything genuinely. we could do well let's have a look at as an instance. message ensure you be aware of  please make. sure you recognize your JavaScript because. you know if you don't know JavaScript is. going to type of be hard to you recognize. it's going to be variety of tough to simply. tag together with it but simply please make. sure you do know JavaScript right so. essentially this says ok client while the. purchaser is on i'll circulate in a. message right good a message event correct.  streamcord discord bot 'm going to take up a function it is. well not a operate this is quite a. parameter right so what we'll.

Do is  discord bot code copy and paste  going to do whatever with. thiis whether it isn't with this message. right i'll say okay if message. content if message approximately contents will. say to lowercase is equal equivalent equivalent to. hiya I'm going to say message so. channel that is send hello there and correct. with the intention to target the message. authors you notice message the writer so. what this does is ok so when the. client see the message correct we are going. to do whatever with it so we need a few. case right. if message content approximately to lowercase. right thiis just sets the full message. to lowercase correct if it is the same as. good day we will say okay message. channel right. message truly in case you examine the. documentation allow me simply see if i can. show you men this genuine quick can see. right over here all right. maybe can't really see it because.

It's in fullscreen but let me see if I. can zoom ooh ok so you notice correct over. right here it's the message category correct it. message is a classmate and message is a. estate right it has an writer as a. channel correct so when you go to channel. it indicates you it tells you the channel. that the message became despatched in right visit. writer to writer the message right so. that is precisely what I'm doing here it's. just like you kinda have to have some . well you type of just want to understand. some  you recognize easy object oriented. programming to be able just you know. recognize these items yet optimistically. you men know it via this. tutorial  if now not and do practice plenty. because you understand the extra you practice. the better you'll become a better. programmer you'll become correct. so if message right message has the. content correct and that iis basically a.

String correct if message content is equal. to hello we will get the message. channel that we'll are gonna. get the channels message we'll. get the message that the channel sent in. sorry after which we'll say ok. we've a message now we're going to say. send hello their message the author and. let's correctly cross ahead and notice what. that does so I'm going to go forward and. restart the bot correct i will say. hi there you'll discover hiya there and it tags. you write some  message that aauthor tag. the user right so it could be anybody. that sends the message howdy and let's. let's cross ahead and mess around with this. little bit more don't say oh let's see. else's right can do a number of instances for. this message that content directly to over. case equals equals equals is the basic a. fashionable one which they do on the discord.

Chat you also can do message that respond. pong o.k. it's simply in actual fact. say okay take the message that become sent. and we'll use the answer we're. gonna use the answer mess right and that i. assume yeah this does not certainly provide you with. a great description you are going to kind. of have to examine the documentation and. mess around with it so message has a. method referred to as reply and it clearly. takes in content material and strategies . you must do with it it in actual fact it. applies to the message correct and you may. see correct over here there is the message. that were gambling pong and that i restart the. bot lower back correct. say pingpong very very undemanding. and you'll suppose like you are able to do. whatever with thiis really such as you  can. simply make a group of you make only a. bunch of commands you know make an easy. text bot right you are going to have a.

discord dungeons and dragons bot  like as an example for. instance elseis message content material dot to. lowercase equals equals equals um let's. say I'm not going to think about any loopy. algorithms at present due to the fact i actually. ponder algorithms and other stuff like. I code finest each time i am like not being. recorded no longer being looking other folks. or correctly understands usually like. like for instance as an instance out if I have been. to do stay coding that would be valid. obviously like consider numerous. algorithms immediately i am just trying to. supply a preferred academic on a way to do. this factor so i am not really going to. you recognize prolong the video much more I'm. just going to make like a simple. educational on how to do those easy. matters right. so the message messages are canta to. decrease case you may say say hi very well. it's a message that channel dots and.

whats up there i am the field and you can say. simply turns into a pet at this factor and you. guys get the belief. okay so let's just say say hi hello. there on the bottle simply simple easy. easy easy simple very very simple. very very simple easy to learn things. that you can do with the bot correct so. i'll show you one thing more though um. correctly I believe for now it is. perhaps good I suggest like I said as soon as. you know the way do you know when you. get the hold of those those get the. grasp of these items correct you could simply. effortlessly just you recognize study  the total. discord um you just effortlessly read the. entire discord documentation you really. gain knowledge of your own and that is surely the way you. have to benefit it first of all because. you know they clearly tell you what. every issue  does and you just you recognize be. very imaginative with it you know that's.