Don't do this: Spying on your discord users with background tasks and discordpy

Sdílet
Vložit
  • čas přidán 10. 11. 2022
  • This video is an introduction to background tasks in discordpy to run python code in intervals to manage your discord server.
    🔗 URLs 🔗
    - discordpy.readthedocs.io/en/s...
    🗃️Github Project URL🗃️
    - github.com/richardschwabe/dis...
    🏆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
    🎥Playlist 🎥
    • How to create a DISCOR...
    ❤Community❤
    To support the channel and see more tutorials about technologies:
    👉LIKE & SUBSCRIBE to the channel:
    czcams.com/users/subscription_c...
    👉Join us on our discord server: / discord
    🌲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!
    🏷️ Tags 🏷️
    how to make a discord bot,python tutorial,discord bot,discord music bot,python discord bot,discord bot maker,discord py,best discord bots 2022,discordpy,discord bot client,create discord bot python,slash commands discord.py,discord py 2.0,create slash commands discord.py,discord.py slash commands,discordpy cogs,discord.py buttons, discord.py tutorial, discord.py tutorial 2023
    © Created by Richard Schwabe with ❤ ©
    Music License: CZcams Audio Library
    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.
  • Věda a technologie

Komentáře • 8

  • @KoraOnEarth
    @KoraOnEarth Před rokem +3

    Hi! Found your channel a day ago and was surprised by the ratio of the number of viewers to the quality of the material. Thank you very much for what you do, and a special thanks for doing it now, when discord bots and discord.py library have undergone significant changes.
    I'm learning programming myself and I found creating a discord bot to be a good and useful practice. Your videos really help me to get my bearings in different topics and learn the material faster.
    From Russia with love!

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

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

  • @masterx6844
    @masterx6844 Před rokem

    Hi, first of all I really love your content, it's really helped me not only to create the bot but also to understand certain concepts. I wanted to ask is there anyway that I can host the bot online instead of locally?

    • @richardschwabe
      @richardschwabe  Před rokem +1

      Thank you. I won't be making a recommendation on this, because there are lots of different ways to do it. Checkout this reddit post for hosting: www.reddit.com/r/Discord_Bots/comments/602slu/faq/
      You can run it on a raspberry pi, you could get a VPS somewhere, you can use the 1 year free tier of AWS etc.
      However it also comes down to your needs of what the bot does. Do you need a database, do you need to run some other services such as Lavalink for a music bot, how many servers & users are you serving with the bot etc. Hence I all I can say is: plan well by thinking of what you want and can achieve and then find a solution that works based on your skillset and technical requirements combined with a budget.
      have fun and much success
      Richard

  • @username-li3ku
    @username-li3ku Před rokem

    First of all, thanks for making this course, it's amazing and I have a feeling it'll be a lot more popular soon. But here's a question: what would be the best way to call other existing commands/functions from this background task cog? Like if you had something set up in a chat command that replies to users, but you wanted to also routinely call that every few minutes, what is the most organized and efficient way to do that?

    • @richardschwabe
      @richardschwabe  Před rokem +1

      It depends on the project setup and the commands. But in bigger projects it would be a bit more "abstract" meaning, you would have classes that control certain things, then the commands or background tasks only become "interfaces" that call methods in the class.
      However, since you have access to the bot reference in the COG example you can access any command. The challenge here is to access the ctx. Because with ctx.invoke() you can call other commands from the bot.
      Another way is to combine it with Webhooks and send data that way to the discord server.
      I hope that gave some pointers/ideas for you to look into.

    • @username-li3ku
      @username-li3ku Před rokem

      @@richardschwabe Ah, ctx.invoke is what i was thinking of. But ultimately you're right: this is mostly about careful consideration of how to structure things. Thanks so much for the suggestions and the quick reply!

  • @Pawlo370
    @Pawlo370 Před 9 měsíci

    hmm i have all users offiine