Richard Schwabe
Richard Schwabe
  • 110
  • 567 492
How to create a Jokes command in discord with python (Short)
In this video we create a simple Joke discord command, that connects to sv443.net/jokeapi/v2/ via python. Our python discord bot can handle blacklists and nsfw channels.
If you want to build your own library of jokes you can use praw.readthedocs.io/en/stable/ and check out www.reddit.com/r/Jokes/ - I have explained PRAW in this video:
czcams.com/video/uJkWxBbqHaw/video.html
🗃️Github Project URL🗃️
- github.com/richardschwabe/discord-bot-2022-course
🏆About this course🏆
My updated course: "How to make a discord bot" with discord.py 2.x covers everything you need to know to raise productivity and user activity on your discord server. By following this course you will learn everything you need to create a successful bot. Resulting in a professional, community driven and feature rich successful discord server.
The initial videos cover all necessary elements to create anything you want with discordpy, this includes:
- Registering a discord bot and inviting it to your server
- Setting up the python project with extra logging functionality
- Introduction to basic discordpy bot command structure
- Automatically load bot commands from separate files
- Handling user input with discordpy converters in a bot instance
- Handling errors during command execution
- Grouping commands together for better command organisation
- Creating discordpy COG (command collections)
- Loading COG extensions automatically from files
- Creating checks to limit access on bot commands
- DMs & "only you can see this" messages
- Hybrid commands to have both custom bot commands but also "SlashCommands"
- Dedicated Slashcommands
- Application commands in context menus for Members and Messages
- Decorators for Slashcommands
- Transform any user input in Slashcommands
- Handling autocompletion and filtering of Slashcommand user input
- Send rich text embeds with pictures, links and tables
- Create Views with Buttons for even better user interactions
- Showing Modals with Selects, TextInputs and Buttons
- Full Rank / Level Discord Bot
- Pagination
- File Handling
Furthermore, the community and I have discussed many different bots on my discord server and I am periodically updating the playlist with new videos around discordpy2. Make sure to check it out and learn how to create bigger bots or very specific commands.
🎥Playlist 🎥
czcams.com/play/PLESMQx4LeD3N0-KKPPDaToZhBsom2E_Ju.html
❤Community❤
To support the channel and see more tutorials about technologies:
LIKE & SUBSCRIBE to the channel:
czcams.com/users/UCIJe3dIHGq1lIAxCCwx8eyA
Join us on our discord server: discord.gg/6h3xTkrpQT
My Linktr.ee:
🌲linktr.ee/richardschwabe
Code to my videos can be found on Github: github.com/richardschwabe
Comment below the video for feedback, suggestions, wishes or if you have spotted a mistake!
This video might have a related article on my website: www.richardschwabe.de
My patreon for the super subscribers: patreon.com/RichardSchwabe
Some affiliate links (I will receive a small commission on Amazon) to support the channel at no extra cost for you:
📚Favorite Books📚
geni.us/rOy8L
geni.us/om4z
geni.us/1l9fKhZ
geni.us/TpZ1
geni.us/AbYnW
🖥️PC Setup🖥️
Duronic Triple Monitor Arm Stand: geni.us/tQVdeC
TeckNet Extended Gaming Mouse Pad: geni.us/o12vH0U
Razer DeathAdder V2: geni.us/N4tP1
Logitech C920 HD Pro Webcam: geni.us/YlBt8N2
Dell U2722D UltraSharp 27: geni.us/IkBOd
Dell S2721DGFA 27 Inch QHD: geni.us/nSmy9
Beyerdynamic DT 770 PRO: geni.us/i6JR
✨Recording✨
Nikon Z30 Camera Kit + 16-50mm: geni.us/s2dAh
Rode Procaster: geni.us/MU3ua6h
Elgato Green Screen: geni.us/BhecX
STEINBERG UR242: geni.us/ltBdFP
Elgato Stream Deck Classic: geni.us/koiy5
🖧Network🖧
Ubiquiti UniFi SmartPower Redundant: geni.us/wIG3U3
Ubiquiti UniFi Dream Machine Pro: geni.us/75zJ9BI
Ubiquiti Networks etc-24-poe: geni.us/hFNiuc
Ubiquiti UniFi 6 Long-Range: geni.us/GTy23S
© Created by Richard Schwabe with ❤ ©
Music License: CZcams Audio Library / Soundstripe
Website: www.richardschwabe.de
All code examples fall under GNU General Public License v3.0
We do not recommend using code shown in tutorials or on our Github public repository to run in production environment and should be used for education only.
We cannot be held liable for any damage caused by the code or do not provide any warranty.
zhlédnutí: 1 674

Video

How to LOCKDOWN an entire discord server with discordpy and python
zhlédnutí 980Před rokem
In this video we create a lockdown command with discordpy to simply disable message sending and application commands in our discord server. ✪ Chapters ✪ 00:00 - Intro 00:19 - Setup Overview 00:52 - Lockdown Command 01:30 - Get Role ID from Discord 02:10 - Continue Lockdown Command 02:50 - Overview Permissions 03:20 - Continue Lockdown Command 04:15 - Testing 04:49 - Unlock Command 06:20 - Testi...
TWO HOUR COURSE: How to Create a FULL Level System Discord Bot (Python Edition)
zhlédnutí 3,1KPřed rokem
In this video we create a full discord bot that functions as a level system / rank system. We create a leaderboard command, custom rank images for users, restrict command usage to a bot command channel, integrate webhooks to post rank updates to dedicated announcement channel. We also handle discord file attachments, create an extendable project structure. Furthermore, we have custom commands t...
Different Command Prefixes per discord server with discordpy (less than 2 minutes)
zhlédnutí 2,1KPřed rokem
In this video I show you how to implement custom command prefixes in discordpy for multiple servers/guilds. 🗃️Github Project URL🗃️ - github.com/richardschwabe/discord-bot-2022-course 🏆About this course🏆 My updated course: "How to make a discord bot" with discord.py 2.x covers everything you need to know to raise productivity and user activity on your discord server. By following this course you...
Send (local & API) Files in Discord with python and discordpy2 (Beginner Full Tutorial)
zhlédnutí 2,8KPřed rokem
In this video we look into different ways to send files in discord using python and discordpy2. We are creating a simple !dog command that takes images from an API and sends them as embeds and replicate this behavior with local files of cats for our !cat command. Lastly we also send attachments in discord directly by the example of a !meeting command. 🗃️Github Project URL🗃️ - github.com/richard...
9 Coding Habits to see immediate improvements (Beginner friendly)
zhlédnutí 244Před rokem
We cover 9 effective habits and approaches to writing better and cleaner software code. ✪ Chapters ✪ 00:10 - No 1 00:52 - No 2 01:28 - No 3 01:51 - No 4 02:21 - No 5 02:58 - No 6 04:00 - No 7 04:24 - No 8 05:01 - No 9 05:22 - Final Thoughts ✦ URL: ✦ - peps.python.org/pep-0020/ - www.microsoft.com/en-us/securityengineering/sdl/practices - en.wikipedia.org/wiki/KISS_principle ❤Community❤ To suppo...
How to Look for Players in Discord with Python and Discordpy
zhlédnutí 1,6KPřed rokem
In this video we create a looking for players command. The user can choose a game and define how many people they are looking for. Others can then interact with an embed and buttons. We are using Slashcommands in Discord to choose the games. If you want autocomplete you can check out the autocomplete example from the Playlist. 🗃️Github Project URL🗃️ - github.com/richardschwabe/discord-bot-2022-...
Easy AUTORESPOND bot in Python for your discord server (Full beginner tutorial)
zhlédnutí 2,4KPřed rokem
In this video we create an autorespond bot in python. It is a simple discordpy example that allows you to configure certain phrases that will be answered automatically, whenever the bot sees specific keywords in any messages. 🗃️Github Project URL🗃️ - github.com/richardschwabe/discord-bot-2022-course 🏆About this course🏆 My updated course: "How to make a discord bot" with discord.py 2.x covers ev...
Discord Bot Failure: A ChatGPT Fiasco
zhlédnutí 307Před rokem
In this video I am trying to find the limits of ChatGPT (I guess crashing it, can be considered so) by creating a simple discord economy bot. ❤Community❤ To support the channel and see more tutorials about technologies: LIKE & SUBSCRIBE to the channel: czcams.com/users/UCIJe3dIHGq1lIAxCCwx8eyA Join us on our discord server: discord.gg/6h3xTkrpQT My Linktr.ee: 🌲linktr.ee/richardschwabe Code to m...
What do you do as a software developer? (UNDERSTAND THIS 1 SENTENCE)
zhlédnutí 92Před rokem
In this video, I'm going to share with you what really matters when it comes to creating successful software projects. And believe me, it's not what you might think! Most people believe that the size, complexity, and features of a software project are the most important factors. If you're looking for tips on how to create successful software projects, this is the video for you. In just 1 short ...
How to create a !giveaway in your discord server with #python #discordpy
zhlédnutí 1,7KPřed rokem
This command allows you to randomly choose a member of your discord. I also show you how to filter out the bad guys. 🗃️Github Project URL🗃️ - github.com/richardschwabe/discord-bot-2022-course 🏆About this course🏆 My updated course: "How to make a discord bot" with discord.py 2.x covers everything you need to know to raise productivity and user activity on your discord server. By following this c...
Use python to read the frontpage of the internet (Step by Step tutorial)
zhlédnutí 147Před rokem
Use python to read the frontpage of the internet (Step by Step tutorial)
Become a better software developer the easy way in 2023
zhlédnutí 940Před rokem
Become a better software developer the easy way in 2023
Discord PAGINATION: All You Need to Know
zhlédnutí 12KPřed rokem
Discord PAGINATION: All You Need to Know
Don’t EXPOSE Secrets on Python - The Simple Solution Only Takes SECONDS!
zhlédnutí 163Před rokem
Don’t EXPOSE Secrets on Python - The Simple Solution Only Takes SECONDS!
Easy Introduction To Python Packages (Pip) - A Step-By-Step Guide
zhlédnutí 79Před rokem
Easy Introduction To Python Packages (Pip) - A Step-By-Step Guide
How to Format Your Output Beautifully in Python
zhlédnutí 1,2KPřed rokem
How to Format Your Output Beautifully in Python
How to create your own ECONOMY bot in Discordpy2!
zhlédnutí 1,7KPřed rokem
How to create your own ECONOMY bot in Discordpy2!
HOW TO MAKE FULL MUSIC BOT IN DISCORD - This is the BEST Way!
zhlédnutí 7KPřed rokem
HOW TO MAKE FULL MUSIC BOT IN DISCORD - This is the BEST Way!
Don't do this: Spying on your discord users with background tasks and discordpy
zhlédnutí 3,5KPřed rokem
Don't do this: Spying on your discord users with background tasks and discordpy
Connect any python programm with #discord using #webhooks
zhlédnutí 8KPřed rokem
Connect any python programm with #discord using #webhooks
Understand Roles & Permissions with discordpy by creating a welcome bot
zhlédnutí 1,5KPřed rokem
Understand Roles & Permissions with discordpy by creating a welcome bot
Offer temporary voice channels for users with discordpy
zhlédnutí 7KPřed rokem
Offer temporary voice channels for users with discordpy
How to create dropdown menus for a discord bot in python (discordpy)
zhlédnutí 10KPřed rokem
How to create dropdown menus for a discord bot in python (discordpy)
Better interactions with your users thanks to Modals with discord py
zhlédnutí 14KPřed rokem
Better interactions with your users thanks to Modals with discord py
How to Add Buttons to Your Discord Message Channel
zhlédnutí 30KPřed rokem
How to Add Buttons to Your Discord Message Channel
How To Add Autocompletion To Your Discord Slash Commands
zhlédnutí 14KPřed rokem
How To Add Autocompletion To Your Discord Slash Commands
How to Create Context Menus for your Discord Bot with #discordpy 2
zhlédnutí 5KPřed rokem
How to Create Context Menus for your Discord Bot with #discordpy 2
How to Create Stylised Embed Messages in Discord with Discord.py
zhlédnutí 15KPřed rokem
How to Create Stylised Embed Messages in Discord with Discord.py
How to Organize your Application Commands with Groups in Discordpy2
zhlédnutí 7KPřed rokem
How to Organize your Application Commands with Groups in Discordpy2

Komentáře

  • @spongebobseyelashes8548
    @spongebobseyelashes8548 Před 8 hodinami

    I am a CS major and your videos are so enjoyable. The code is simple and easy to follow, as well as very easy to expand upon. I've already read a few books on Python but these tutorials are a breath of fresh air that are nothing but fun. Thank you for this man

  • @tickleservice4376
    @tickleservice4376 Před 8 dny

    5:46

  • @zaxspace
    @zaxspace Před 11 dny

    What if your bot is added to multiple guilds? How would that change the sync process?

    • @spongebobseyelashes8548
      @spongebobseyelashes8548 Před 8 hodinami

      For multiple guilds you want to have a central guild that you use for testing. You input this guild id to the sync command and this will immediately sync the tree for that server. For global trees it may take longer, in which case you do not supply the guild id. Once you are done testing feel free to remove the guild argument just know the sync will take time

  • @aabbcc7532
    @aabbcc7532 Před 13 dny

    "pip install discord" and "pip install discord.py" work but "pip install discord.py[voice]" does not

  • @archerdante
    @archerdante Před 14 dny

    for everyone who don't see slash commands upon bot launch try also restart discord app, sometimes it's not refreshes command list by itself anytime soon, so restarting forces it to reload the list from server

    • @igo9481
      @igo9481 Před 2 dny

      god danggit. thank you lmao. this had me fkn stumped

  • @DefaultCubeIcon
    @DefaultCubeIcon Před 19 dny

    module settings has no attribute logging

  • @pepsi3168
    @pepsi3168 Před 22 dny

    theres no need to defer the interaction, you could just respond to it with await interaction.response.edit_message()

  • @ThomasNosey
    @ThomasNosey Před 27 dny

    class PaginationView(discord.ui.View): """ This class is responsible for creating embeds for listing a user's collection. For now this is orientated at a monster collection but different functions can be created later on when needed. """ current_page : int = 1 sep : int = 5 async def send(self, interaction): await interaction.response.send_message(view=self) self.message = await interaction.original_response() await self.update_message(self.data[:self.sep]) def create_embed(self, data): embed = discord.Embed(title = "monsters") for monster, count in data: embed.add_field(name=monster, value=f"Count: {count}", inline=False) return(embed) async def update_message(self, data): self.update_buttons() await self.message.edit(embed=self.create_embed(data), view = self) This is my code to make this work with interactions in case anyone is interested.

  • @informationdisclosure
    @informationdisclosure Před měsícem

    Wtf, thanks

  • @InvaderSamurai
    @InvaderSamurai Před měsícem

    Thanks! you saved a catgirl from errors...

  • @Untergrund_Koenig
    @Untergrund_Koenig Před měsícem

    Can you show us how we can use the buttons and selects permanently? Because if the bot reconnects, the buttons and selects are no longer functional :(

  • @WilliamWonker
    @WilliamWonker Před měsícem

    Thanks! The docs aren't the most helpful sometimes, this was excellent.

  • @pauldong4425
    @pauldong4425 Před měsícem

    What are the benefits of going through the steps of putting token in .env file and then using github etc compared to simply copying the token into the bot.run() command?

    • @user-dr8in4gr6t
      @user-dr8in4gr6t Před měsícem

      people may see your token if its in the normal file but using a env is more safe

  • @smilosik_
    @smilosik_ Před měsícem

    Not working

    • @Xsylnx
      @Xsylnx Před 24 dny

      Hi wanna partner up? I've just made my new server it's my first ever server and ye that's all also it's inspired from akatsuki

  • @ItzClinky
    @ItzClinky Před měsícem

    WHAT DO IT DO? pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    • @swasikamel
      @swasikamel Před měsícem

      Hey, I had the same problem. Just try pip3 instead of pip, that should fix it.

    • @makszab285
      @makszab285 Před 25 dny

      u installed python incorrectly

  • @Rosiesrosee
    @Rosiesrosee Před měsícem

    Guys this tutorials qon't work cause they're almost 2 years old (in 2024) python changes over time

  • @welshtony1
    @welshtony1 Před měsícem

    Im getting "Call expression not allowed in type expression Pylance" on the slap command for Slapper(use_nicknames=True) Do I just ignore it or is there a fix for this?

  • @welshtony1
    @welshtony1 Před měsícem

    Can we combine the say and say2 commands? aka !say with 2 words (or more) will say all the words but if nothing is said respond with WHAT?

    • @Maxxzyy
      @Maxxzyy Před 6 dny

      I'm wondering the same thing! When I try to combine them I get an error message saying that parameters with "*" can't have a default value :(

  • @Dejv007
    @Dejv007 Před 2 měsíci

    someone know why my bot writing: None slaps user_bot with fish

  • @bij_ay
    @bij_ay Před 2 měsíci

    It works ok but , why it so damn useless 🤔

  • @bij_ay
    @bij_ay Před 2 měsíci

    This maybe good but idk why u r making simple steps a complex

  • @LiveAkshat
    @LiveAkshat Před 2 měsíci

    very underrated still the best discord bot tutorial video i ever found you are getting a subscribe man ❤

  • @ismathazimzainal9488
    @ismathazimzainal9488 Před 2 měsíci

    I don’t get it, what do we actually use the webhook for?

    • @user-hb8kc4cc1c
      @user-hb8kc4cc1c Před měsícem

      to send messages to a discord channel via a simple program rather than a bot user

  • @thatwysiguy
    @thatwysiguy Před 2 měsíci

    is this course still good? I want to create a bot for my assignment but i'm not sure how to do that.

  • @nxr_found9966
    @nxr_found9966 Před 2 měsíci

    Hey, how do I make that debug command?

  • @user-sc4gj1tv3o
    @user-sc4gj1tv3o Před 2 měsíci

    when i run the code i got this error: Traceback (most recent call last): File "c:\Users\gogol\Desktop\bot.py", line 10, in <module> class FeedbackModal(discord.ui.Modal, title="Ta des suggestions ?"): File "c:\Users\gogol\Desktop\bot.py", line 11, in FeedbackModal fb_title = discord.ui.TextInput(style=discord.TextStyle.short,label="Titre",required=False,placeholder="Donne moi un titre wesh") AttributeError: module 'discord.ui' has no attribute 'TextInput' anyone can help me please ?

  • @TryAgainMemeGuy
    @TryAgainMemeGuy Před 2 měsíci

    😊😅😮😢🎉😂❤

  • @dercas79
    @dercas79 Před 3 měsíci

    🤞 Someday.

  • @NahhDontTryToFindMe
    @NahhDontTryToFindMe Před 3 měsíci

    when doing pip install it dosnt work? Pls help man

  • @itarqos5
    @itarqos5 Před 3 měsíci

    My commands and everything work perfectly and i have about 18 Slash Commands, when i try to add one more command the added command doesn't show up nor work nor anything at all, it doesn't show up, and i checked the console but there's no errors occuring, all the commands are working and showing up except the 19th command. Can anyone help me at this error?

  • @DrClaus100
    @DrClaus100 Před 3 měsíci

    Great tutorial - did I miss something or did something change compared to last session eg. logger, where did that come from

  • @Redlava
    @Redlava Před 3 měsíci

    ive been looking all over for a video that uses bot commands THANK YOU SO MUCH

  • @JustfluffyNora
    @JustfluffyNora Před 3 měsíci

    Okay so it doesnt run the code. I didnt create an extra file for it and used it directly in the main file it doesnt throw any errors whatsoever but also doesnt run this part at all.

  • @henrydowns6267
    @henrydowns6267 Před 3 měsíci

    hi! i am struggling to get infos.log to populate. i don't raise any errors when i run, and logs seem to populate in the terminal, but my logs folder remains empty. any chance you can help? thanks!

    • @deepspacek9
      @deepspacek9 Před 3 měsíci

      Under "LOGGING_CONFIG" I had capitalized the L in "loggers" and this caused this exact problem to happen to me.

    • @M0M0J
      @M0M0J Před měsícem

      another thing that i had to do was add "dictConfig(LOGGING_CONFIG)" at the very end of my settings.py script. Then it populated correctly!

  • @mrtux4fun
    @mrtux4fun Před 3 měsíci

    Really great introduction with real world configuration examples! Thank you very much.

  • @log8746
    @log8746 Před 4 měsíci

    Awesome tutorial! I have a question. Should I also make separate files for subcommands? If so, how can I load them?

  • @Akhildesignsbuddy
    @Akhildesignsbuddy Před 4 měsíci

    sir your are a gem 😍🤧😭 thank you for making short video so I don't get bored

  • @iwswordpress
    @iwswordpress Před 4 měsíci

    Excellent! This is the best and clearest explanation of logging I have come across after a lot of searching. Rge step by step examples and code make logging clear and useful Well done and thank you for making this.

  • @cnnzll
    @cnnzll Před 4 měsíci

    5.8k views. and only 58 likes and 4 comments. support this guy

  • @Sockheadrps
    @Sockheadrps Před 4 měsíci

    Pretty much one of the best tutorials for discord py I’ve seen ty

  • @47shashank47
    @47shashank47 Před 4 měsíci

    Thanks a lot ...best video ever watched on logging

  • @felixa9667
    @felixa9667 Před 4 měsíci

    This was very well explained. Helped a lot, thanks for sharing.

  • @airidasrom583
    @airidasrom583 Před 4 měsíci

    How do i make it into slash command, i am having trouble making it into slash command

  • @OakWoodZEdits
    @OakWoodZEdits Před 4 měsíci

    im from 2024 and gosh when i see the 1 year ago and it says 2023 i started to cry

  • @2GoodMath
    @2GoodMath Před 4 měsíci

    Wow

  • @airidasrom583
    @airidasrom583 Před 4 měsíci

    is it possible to add drop down in the menu ?

  • @AbyssParadox
    @AbyssParadox Před 4 měsíci

    im getting the error: "'Slapper' object has no attribute 'use_nicknames'" how do i fix?

    • @welshtony1
      @welshtony1 Před měsícem

      getting the same thing. did you fix it?

    • @AbyssParadox
      @AbyssParadox Před měsícem

      @@welshtony1 no not yet, I took a prety long break with coding a discord bot. I have some personall things that im foccusing on. Hope that you can find the answer.

  • @AbyssParadox
    @AbyssParadox Před 4 měsíci

    what extensions do you use for coding your discord bot?

  • @kshitijtyagi5113
    @kshitijtyagi5113 Před 4 měsíci

    can we send videos through this as well?