Discord Bot Using Python - #2

Publicado el: 16 junio 2022
en el canal de: SapDoesStuff
44
4

Hello guys , today we will be improving our bot from the last video , where we made a bot which will reply to requests of telling a joke. Today , instead of getting a message , we will make the bot to run on commands. So , let's get started.
Now , for the code.Code of this program is pretty similar to the last video , we just made some minor tweaks. So what we did is , we first imported the libraries , loaded the .env file , then got the discord token from there. but after that , instead of initializing a client like last video , we initialize a bot with the command prefix being /. then we checked if the bot is ready and printed a message according to that , then we checked if a command with name 'joke' is being run or not. if it does , then we just print a random joke like the last video.
So that's it for today guys , hope you guys enjoyed , and see you in the next video.

Love of All by Twin Musicom is licensed under a Creative Commons Attribution 4.0 licence. https://creativecommons.org/licenses/...

Artist: http://www.twinmusicom.org/

Journey in the New World by Twin Musicom is licensed under a Creative Commons Attribution 4.0 licence. https://creativecommons.org/licenses/...

Source: http://www.twinmusicom.org/song/258/j...

Artist: http://www.twinmusicom.org

Github Repo For This Project:
https://github.com/sdcard2008/discord...


En esta página del sitio puede ver el video en línea Discord Bot Using Python - #2 de Duración hora minuto segunda en buena calidad , que subió el usuario SapDoesStuff 16 junio 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 44 veces y le gustó 4 a los espectadores. Disfruta viendo!