Discord Bot tutorial - the way to have a Discord Bot read messages and reply againSo welcome back to my second video so in. the last video with a bit of luck that and that. became enormously quickly for those are things. which you sort of just ought to do through. default it's kind of like even quoted. yet another language and you need to import. like applications or modules or you know a. library or it is certainly anything it is. just sincerely the standard but these. are just essentially matters that you want. to do is locate ensure you understand that you. need to do them right and and so on so now. that you've got coded thiis right let's get. all started on next we making some as an instance. some cool matters so we want to do is I'm. going to claim okay I want to take the. client i'll say okay on all right. this is a technique right so you can. in fact when you've got visuals in your. code recommended what occurs is and. you can also examine the documentation too.And tells you exactly what you can do. correct so clearly it will take in. a few variety of occasion right so on the event. of a message right so when the bot see. the message correct we will do some. type of we're going to do some form of. function and we could do anything certainly. we could do well let's have a look at for example. message make sure you understand please make. sure you know your JavaScript? due to the fact. you know if you don't know JavaScript? is. going to kind of be tough to you know. it's going to be style of tough to simply. tag including it but just please make. sure you do comprehend JavaScript? right so. in actual fact this says okay purchaser whilst the. purchaser is on I'm going to pass in a. message right well a message occasion correct. i will soak up a operate that is. good no longer a function this is sort of a. parameter correct so what we will.<iframe src="https://www.youtube.com/embed/vQw8cFfZPx0" width="560" height="315" frameborder="0" allowfullscreen></iframe>Do is we will 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 equivalent equal equivalent to. howdy I'm going to say message so. channel that's ship hi there there and right. that allows you to target the message. authors you notice message the writer so. what this does is ok so while the. client see the message right we are going. to do something with it so we want some . case right. if message content about to lowercase. right thiis just units the complete message. to lowercase right if it is equal to. whats up we'll say ok message. channel right. message basically if you examine the. documentation allow me just see if i will. show you men this real speedy can see. right over right here o.k.. might be cannot really see it because.it is in fullscreen but allow me see if I. can zoom ooh ok so you spot right over. here it is the message classification correct it. message is a classmate and message is a. estate right it has an writer as a. channel right so once you go to channel. it indicates you it tells you the channel. that the message became despatched in correct go to. writer to author the message correct so. that is precisely what I'm doing right here it's. just like you kinda should have some . good you sort of simply want to appreciate. a few you recognize straightforward object orientated. programming to be able simply you know. understand these items but with a bit of luck. you men know it through this. educational if not and do practice plenty. since you know the more you train. the higher you'll become a greater. programmer you'll become right. so if message right message has the. content material right and that iis basically a.String correct if message content is equivalent. to hi there we're going to get the message. channel that we'll are gonna. get the channels message we're going to. get the message that the channel despatched in. sorry after which we're going to say okay. we have a message now we will say. send good day their message the author and. let's in fact cross forward and spot what. that does so I'm going to go ahead and. restart the bot right I'm going to say. whats up you can see good day there and it tags. you write a few message that aauthor tag. the user right so it may be anyone. that sends the message whats up and let's. let's cross forward and play around with this. little bit more don't say oh let's examine. else's correct can do numerous circumstances for. this message that content on to over. case equals equals equals is the fundamental a. trendy one that they do at the discord.Chat you can also do message that respond. pong all right it is just clearly. say okay take the message that become sent. and we will use the reply we're. gonna use the answer mess correct and i. suppose yeah this does not surely give you. a superb description you're going to variety. of have to examine the documentation and. mess around with it so message has a. technique referred to as reply and it sincerely. takes in content material and suggestions whatever. you must do with it it clearly it. applies to the message right and you can. see right over right here there's the message. that were playing pong and i restart the. bot again right. say pingpong very very effortless. and you can assume like you can do. anything with thiis really such as you can. just make a bunch of you are making only a. bunch of commands you recognize make an easy. textual content bot right you are going to have a.Command something like as an example for. instance elseis message content material dot to. lowercase equals equals equals um let's. say I'm unlikely to think about any loopy. algorithms at present due to the fact I really. contemplate algorithms and other stuff like. https://wefx.info/discord-poll-bot-see-here/ code best whenever i am like no longer being. recorded no longer being watching other people. or correctly is familiar with normally like. like as an instance as an example out if I were. to do live coding that would be valid. definitely like consider loads of. algorithms today I'm just trying to. give a preferred tutorial on the way to do. this aspect so i am probably not going to. you recognize extend the video even more i am. simply going to make like a simple. educational on how to do these easy. things right. so the message messages are canta to. lower case you can say say hello alright. it is a message that channel dots and.hiya there I'm the box and you may say. just becomes a pet at this factor and you. men get the assumption. alright so let's simply say say hello hello. there at the bottle simply simple simple. simple easy simple very very simple. very very simple easy to profit matters. you can do with the bot correct so. i'll show you one other thing although um. correctly i think for now it really is. perhaps good I mean like I stated once. you know how do you know once you. get the hang of these those get the. grasp of this stuff correct you could just. effortlessly just you recognize read the total. discord um you only easily examine the. overall discord documentation you actually. gain knowledge of your own and that is certainly the way you. have to benefit it firstly due to the fact. you know they in actual fact let you know what. every aspect does and you only you know be. very ingenious with it you recognize that is.

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2021-12-23 (木) 16:01:34 (25d)