{"id":1964,"date":"2022-05-04T00:00:00","date_gmt":"2022-05-04T00:00:00","guid":{"rendered":"http:\/\/kocerroxy-homepage.staging.ideatocode.tech\/how-to-make-a-discord-bot-for-availability-alerts\/"},"modified":"2025-06-23T11:05:56","modified_gmt":"2025-06-23T11:05:56","slug":"how-to-make-a-discord-bot-for-availability-alerts","status":"publish","type":"post","link":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/","title":{"rendered":"How to Make a Discord Bot for Availability Alerts"},"content":{"rendered":"\n<p>So far, we\u2019ve covered a few steps to increase your chances of <a href=\"https:\/\/kocerroxy.com\/blog\/how-to-get-a-ps5-at-retail-price\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>getting a PS5 at retail price<\/strong><\/a>.&nbsp; We\u2019ve gone over how to <a href=\"https:\/\/kocerroxy.com\/blog\/diy-ps5-availability-tracker\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>write your own PS5 availability tracker<\/strong><\/a> as well as how to have it <strong>send out email notifications<\/strong>. Now let&#8217;s upgrade that basic web scraper into a Discord bot for availability alerts.<\/p>\n\n\n\n<p>In the spirit of keeping things beginner-friendly, we\u2019re coding in <a href=\"https:\/\/www.python.org\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Python<\/strong><\/a> with an easy-to-use <strong>free library for web scraping<\/strong> uniquely named <a href=\"https:\/\/pypi.org\/project\/beautifulsoup4\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>BeautifulSoup<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">Interested in buying proxies for your web scraping bot?<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"><strong><a href=\"https:\/\/kocerroxy.com\/\">Check out our proxies!<\/a><\/strong><\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Buy proxies for your web scraping bot<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-you-ll-need-to-upgrade-your-scraper-into-a-discord-bot-for-availability-alerts\"><span class=\"ez-toc-section\" id=\"What_Youll_Need_to_Upgrade_Your_Scraper_Into_a_Discord_Bot_for_Availability_Alerts\"><\/span>What You\u2019ll Need to Upgrade Your Scraper Into a Discord Bot for Availability Alerts<span class=\"ez-toc-section-end\"><\/span><\/h2><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ffffff;color:#ffffff\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ffffff;color:#ffffff\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#What_Youll_Need_to_Upgrade_Your_Scraper_Into_a_Discord_Bot_for_Availability_Alerts\" >What You\u2019ll Need to Upgrade Your Scraper Into a Discord Bot for Availability Alerts<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Discord_Setup\" >Discord Setup<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Additional_Imports_to_Upgrade_Your_Scraper_Into_a_Discord_Bot_for_Availability_Alerts\" >Additional Imports to Upgrade Your Scraper Into a Discord Bot for Availability Alerts<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Environmental_Variables\" >Environmental Variables<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Operating_System_Module\" >Operating System Module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Random_Module\" >Random Module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Import_Code\" >Import Code<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Additional_Variables_to_Upgrade_Your_Scraper_Into_a_Discord_Bot_for_Availability_Alerts\" >Additional Variables to Upgrade Your Scraper Into a Discord Bot for Availability Alerts<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Other_Variables_Channel\" >Other Variables: Channel<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Other_Variables_Roles\" >Other Variables: Roles<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Other_Variables_Intents\" >Other Variables: Intents<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Other_Variables_Bot\" >Other Variables: Bot<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Additional_Functions_to_Upgrade_Your_Scraper_Into_a_Discord_Bot_for_Availability_Alerts\" >Additional Functions to Upgrade Your Scraper Into a Discord Bot for Availability Alerts<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Function_Scrape\" >Function: Scrape<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Bot_Functions\" >Bot Functions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Event_On_Ready\" >Event: On Ready<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Task_Update_Presence\" >Task: Update Presence<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Task_Passive_Loop_Scrape\" >Task: Passive Loop Scrape<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Event_Manual_Scrape_Call\" >Event: Manual Scrape Call<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Main_Code_Body\" >Main Code Body<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Q1_Is_there_an_alarm_bot_for_Discord\" >Q1. Is there an alarm bot for Discord?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Q2_How_to_loop_a_task_in_Python\" >Q2. How to loop a task in Python?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<p>There are some more libraries you\u2019ll need to install and import to expand the web scraper we\u2019ve made so far.<\/p>\n\n\n\n<p>One of them involves making an external file for private variables rather than including it in the code. This step isn\u2019t necessary if you\u2019re never going to show your code to anyone else. But it is a good habit to have.<\/p>\n\n\n\n<p>Also, for the bot to play nicely with Discord, you\u2019ll need to use Discord. Crazy, I know.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-discord-setup\"><span class=\"ez-toc-section\" id=\"Discord_Setup\"><\/span>Discord Setup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Presumably, you have some degree of familiarity with <a href=\"https:\/\/discord.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Discord<\/strong><\/a> already, hence why you\u2019re compelled to make a Discord bot. You can use your normal account to set the bot up. Or, you can make a separate account for it if you want.&nbsp;<\/p>\n\n\n\n<p>You\u2019ll need admin rights on every server that you want to invite the bot to. Also, to simplify things, the code will assume that the bot has full rights. However, most people won\u2019t casually grant them to a random bot. Because of this fact, I recommend <a href=\"https:\/\/discord.com\/blog\/starting-your-first-discord-server\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>making a new server<\/strong><\/a> specifically for the bot\u2019s purposes.<\/p>\n\n\n\n<p>Once you have your server ready, you\u2019ll need to make a bot account to get a unique token password for your bot. The <strong>documentation for the Discord Python API wrapper<\/strong> covers how to <strong>create a bot account<\/strong> in depth, with images.\u00a0<\/p>\n\n\n\n<p>For a TLDR version, though:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log onto the <a href=\"https:\/\/discord.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Discord<\/strong><\/a> Site.<\/li>\n\n\n\n<li>Then go to the Applications page and create a New Application.<\/li>\n\n\n\n<li>Next, click the Bot tab and Add Bot.<\/li>\n\n\n\n<li>Copy the token and keep it to the side for now.<\/li>\n\n\n\n<li>Go back to the Applications Page and go to your bot\u2019s page.<\/li>\n\n\n\n<li>Navigate to the OAuth2 tab.<\/li>\n\n\n\n<li>Select Bot under Scopes and Administrator under Bot Permissions.<\/li>\n\n\n\n<li>Use the generated URL to invite the bot to the server and Authorize it.<\/li>\n<\/ul>\n\n\n\n<p>In addition to all of this setup, there\u2019s one more thing you want to do inside the server the bot will run in. You want to create two roles via Server Settings &gt; Roles.&nbsp;<\/p>\n\n\n\n<p>The first role is for people who are allowed to command the bot to manually run a scraping attempt. I\u2019ll refer to it as the authorized role of \u201cBot Boss&#8221; in the code. Once the role is created, be sure to give it to yourself; the bot is going to check for it.<\/p>\n\n\n\n<p>The other role is for people who will get pinged when the bot detects that PS5s are available. I\u2019ll refer to it as the alert role &#8220;Tracking PS5 Alerts&#8221; in the code. Again, make sure you give the role to yourself, as I\u2019m assuming that\u2019s the whole reason you\u2019re making this bot.<\/p>\n\n\n\n<p>Now, let\u2019s discuss the extra goodies we\u2019ll be using.<\/p>\n\n\n\n<p class=\"has-text-align-center\">Also read: <strong><a href=\"https:\/\/kocerroxy.com\/blog\/free-libraries-to-build-your-own-web-scraper\/\" target=\"_blank\" rel=\"noreferrer noopener\">Free Libraries to Build Your Own Web Scraper<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-additional-imports-to-upgrade-your-scraper-into-a-discord-bot-for-availability-alerts\"><span class=\"ez-toc-section\" id=\"Additional_Imports_to_Upgrade_Your_Scraper_Into_a_Discord_Bot_for_Availability_Alerts\"><\/span>Additional Imports to Upgrade Your Scraper Into a Discord Bot for Availability Alerts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>As you\u2019ve likely already guessed, interacting with the Discord API isn\u2019t a default feature of Python. So, we\u2019ll need to install and then import it. <a href=\"https:\/\/github.com\/Rapptz\/discord.py\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>The Python Discord API Wrapper<\/strong><\/a> documentation<strong> <\/strong>includes <strong>installation instructions<\/strong> for a few different configurations if you need help.<\/p>\n\n\n\n<p>On top of the Discord module, we\u2019re going to use something that we could have implemented earlier with the email details: environmental variables. They are saved in a .env file, aka dotenv, for syntax reasons.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-environmental-variables\"><span class=\"ez-toc-section\" id=\"Environmental_Variables\"><\/span>Environmental Variables<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Calling load_dotenv() will look for a .env file within the same directory as your program, as well as its parent directories. Well, unless you specify otherwise.<\/p>\n\n\n\n<p>That little file is the declaration of sensitive variables, written in normal Python syntax. You can make it in Notepad by writing your desired variables, in this case:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DISCORD_TOKEN = \"\"<\/code><\/pre>\n\n\n\n<p>Inside the \u201c\u201d paste the Discord bot token you generated earlier.<\/p>\n\n\n\n<p>Then go to Save As, select Save as Type: All Files, and then manually set the .env extension after whatever filename you want to use.<\/p>\n\n\n\n<p>You could theoretically put all of your declared variables in there. But that would involve more calls than is otherwise necessary to pull each piece of data. So, you should only bother doing that with information you want to keep private from any other people who will potentially see your code. The main use case is protecting account information, particularly passwords.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Operating_System_Module\"><\/span>Operating System Module<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Python\u2019s base skeleton isn\u2019t designed to play around with file directories by default. So, to use dotenv, you\u2019ll need to import the OS module, too.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Random_Module\"><\/span>Random Module<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>While we\u2019re at it, let&#8217;s also grab the random module. This will be useful when we have the Discord bot passively loop the scraper function. Repeated calls at fixed time intervals are a red flag for bot shenanigans, as covered in <a href=\"https:\/\/kocerroxy.com\/blog\/five-tips-for-outsmarting-anti-scraping-techniques\/\"><strong>Five Tips for Outsmarting Anti-Scraping Techniques<\/strong><\/a>. So, we want to implement a randomized wait time between loops to make it seem more organic.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Import_Code\"><\/span>Import Code<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>With the explanation breakdowns out of the way, here\u2019s the code snippet for all of the additional imports:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import discord\nfrom discord.ext import commands, tasks\nfrom discord.utils import get\nimport os\nfrom dotenv import load_dotenv\nimport random<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-center\">Also read: <strong><a href=\"https:\/\/kocerroxy.com\/blog\/sending-email-notifications-in-python\/\" target=\"_blank\" rel=\"noreferrer noopener\">Sending Email Notifications in Python<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Additional_Variables_to_Upgrade_Your_Scraper_Into_a_Discord_Bot_for_Availability_Alerts\"><\/span>Additional Variables to Upgrade Your Scraper Into a Discord Bot for Availability Alerts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Simply making the .env file isn\u2019t enough; you need to call it and pull the information from it. Assuming you made the .env the same as explained above, pulling your token information from it would look like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>load_dotenv()\ntoken = os.getenv(\"DISCORD_TOKEN\")<\/code><\/pre>\n\n\n\n<p>Simple, right?&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Other_Variables_Channel\"><\/span>Other Variables: Channel<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Now we have just a few more variables to add in that don\u2019t have strict privacy requirements.<\/p>\n\n\n\n<p>First up is the channel ID for where we want the bot to send all of its messages. It\u2019s as simple as right-clicking on the desired channel in Discord and selecting the bottom option, Copy ID.&nbsp;<\/p>\n\n\n\n<p>However, you need to have Developer Mode enabled for your Discord account. To turn it on, go into your Discord client\u2019s User Settings &gt; Advanced and check the first option, Developer Mode. There\u2019s no downside to leaving this on all the time, so you can set it and forget it.<\/p>\n\n\n\n<p>Once you have that channel ID, set the variable with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>channel = bot.get_channel()<\/code><\/pre>\n\n\n\n<p>Just be sure to paste the recently copied channel ID inside the ().<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Other_Variables_Roles\"><\/span>Other Variables: Roles<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Now, let\u2019s also set up the variables for those Discord roles you created earlier.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alert_role = \"Tracking PS5 Alerts\"\nauthorized_role = \"Bot Boss\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Other_Variables_Intents\"><\/span>Other Variables: Intents<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Speaking of authorization, we need to tell the bot what authorization it has, which it calls intents.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INTENTS = discord.Intents.all()<\/code><\/pre>\n\n\n\n<p>This is assuming you grant it full admin rights, which will allow for greater flexibility for any additional features you develop in the future. For example, you could program commands for distributing the roles.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Other_Variables_Bot\"><\/span>Other Variables: Bot<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Finally, let\u2019s establish the bot\u2019s settings.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bot = commands.Bot(command_prefix=$, case_insensitive=True, intents=INTENTS)<\/code><\/pre>\n\n\n\n<p>That command prefix means that when you tell the bot to do something, it has to start with $ so the bot knows that you\u2019re talking to it.&nbsp;<\/p>\n\n\n\n<p>When you have feature-rich bots, you don\u2019t want them randomly executing commands because someone said a keyword in an idle conversation. Just like you need to tell Alexa to answer with a different name when you live with someone with a similar name. It gets awkward really quick.<\/p>\n\n\n\n<p>Case-insensitive is so that when you hit caps lock, the bot still functions all the same. This isn\u2019t a big deal when there are only a few simple commands. However, having long commands that take variables into account can be annoying. Trust me, I <strong>know<\/strong>.<\/p>\n\n\n\n<p class=\"has-text-align-center\">Also read: <strong><a href=\"https:\/\/kocerroxy.com\/blog\/high-scale-bot-automation-succeed-in-competitive-markets\/\" target=\"_blank\" rel=\"noreferrer noopener\">High-Scale Bot Automation: Succeed in Competitive Markets<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Additional_Functions_to_Upgrade_Your_Scraper_Into_a_Discord_Bot_for_Availability_Alerts\"><\/span>Additional Functions to Upgrade Your Scraper Into a Discord Bot for Availability Alerts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now that we\u2019re done with the prep work, let\u2019s get into the meat of the code. The following code is operating under the assumption that your existing functions were previously explained:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>get_title(soup)<\/li>\n\n\n\n<li>get_price(soup)<\/li>\n\n\n\n<li>get_availability(soup)<\/li>\n\n\n\n<li>send_email()<\/li>\n<\/ul>\n\n\n\n<p>With all of their required imports and variables.<\/p>\n\n\n\n<p>We&#8217;ll want the bot to not only loop scraping attempts passively but also on demand. So, let\u2019s take it out of the main code and instead make it a function.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Function_Scrape\"><\/span>Function: Scrape<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Once we separate the scraper from the main body, its function ends up looking like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def scrape(): \n    webpage = requests.get(URL, headers=HEADERS)\n    soup = BeautifulSoup(webpage.content, \"lxml\")\n\t\n\tget_availability(soup)\n\t\n\tif isAvailable:\n\t\tsend_email()<\/code><\/pre>\n\n\n\n<p>If you wanted to get fancy, you\u2019d have it take URL and HEADERS as arguments. That way, you could have it look at a different site for each call and use different User Agents too.<\/p>\n\n\n\n<p>For rapid looping scrape attempts, changing User Agents becomes much more important. That\u2019s also when utilizing <strong>rotating residential proxies<\/strong> becomes essential. More on that in a bit.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Bot_Functions\"><\/span>Bot Functions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Now onto the functions that are specifically for the Discord bot. When these functions are declared, they also need to specify what type of function they are.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Event_On_Ready\"><\/span>Event: On Ready<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This little function is triggered when the bot connects to Discord and is ready to start taking commands.<\/p>\n\n\n\n<p>The async before the definition stands for asynchronous. This enables multithreading, so the bot can do more than one thing at a time.<\/p>\n\n\n\n<p>Await means it will pause its multithreaded processes until the await portion is complete. In this case, sending a message.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@bot.event\nasync def on_ready():\n    await channel.send(\"Ready to work!\")\n    update_presence.start()<\/code><\/pre>\n\n\n\n<p>That update_presence function it calls is for rich presence text for the bot. This is what you see when you look at its Discord user status while it\u2019s running. Although it&#8217;s not necessary, this feature ensures that the bot correctly detects the roles. Let\u2019s cover that function next.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Task_Update_Presence\"><\/span>Task: Update Presence<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Here we\u2019ll set the bot to passively loop updates to its rich presence status text every 10 minutes. What it\u2019s going to do is check and display how many people across all of its active servers have the &#8220;Tracking PS5 Alerts&#8221; role.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@tasks.loop(seconds=600)\nasync def update_presence():\n    guilds = bot.guilds\n    members = sum(&#91;len(x.members) for x in &#91;get(y.roles, name=alert_role) for y in guilds]])\n    rich_presence_text = f\"{members} users tracking PS5 availability\"\n\n    await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=rich_presence_text))<\/code><\/pre>\n\n\n\n<p>A sample of the display it could have is \u201cWatching 2 users tracking PS5 availability\u201d.&nbsp;<\/p>\n\n\n\n<p>If you want to be pedantic, you can have it do an if check for members = 1 and make sure it only outputs \u201cuser\u201d instead of \u201cusers\u201d.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Task_Passive_Loop_Scrape\"><\/span>Task: Passive Loop Scrape<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Next up is a passively looping function to check for PS5 availability.&nbsp;<\/p>\n\n\n\n<p>It\u2019s very risky to set the time between loops too short when you aren\u2019t using a proxy service that rotates IPs for you. For this high-risk scenario, set a randomized time ranging from 500 to 700 seconds, or 8.3 to 11.6 minutes.&nbsp;<br>However, if you have your bot go through a reliable proxy provider like <a href=\"https:\/\/kocerroxy.com\/\"><strong>KocerRoxy<\/strong><\/a>, you can set a tighter schedule without fear of being blocked. You should still randomize it, but you can use much smaller numbers. Additionally, it\u2019s important to stay updated on news that may affect your operations, such as the <a href=\"https:\/\/kocerroxy.com\/blog\/white-house-sets-final-deadline-for-us-tiktok-ban-decision\/\">white house tik tok ban deadlines<\/a>. Changes in legislation can impact the reliability of your proxy service and your overall strategy. Therefore, regularly reviewing your settings and the tools at your disposal will help ensure compliance and efficiency in your activities.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@tasks.loop(seconds = random.randint(500, 701))\nasync def passive_scraper():\n    scrape()\n    \n    if isAvailable:\n        await channel.send(f\"{alert_role.mention}! {get_title(soup)} is {get_availability(soup)} for {get_price(soup)}\")<\/code><\/pre>\n\n\n\n<p>If it detects that PS5s are available, it will announce a message on the designated channel. This message will ping everyone with the &#8220;Tracking PS5 Alerts&#8221; role. That way, they don\u2019t have to have the channel always send alerts. Instead, they can set it to only alert them upon being mentioned.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Event_Manual_Scrape_Call\"><\/span>Event: Manual Scrape Call<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This function is watching in case someone with the &#8220;Bot Boss&#8221; role sends a message into a chat with the specified command. As long as the start of the message matches, it will run the command.<\/p>\n\n\n\n<p>For example, all of the following will trigger it:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>$r<\/li>\n\n\n\n<li>$refresh<\/li>\n\n\n\n<li>$RaBbIt FoOt FoR gOoD lUcK<\/li>\n<\/ul>\n\n\n\n<p>This function will run a manual scrape and output the results regardless of availability. This doubles as a debug command to ensure it\u2019s scraping properly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@bot.event\n@commands.has_role(authorized_role)\nasync def on_message(message: discord.Message):\n    if message.content.lower().startswith(f\"{command_prefix}r\"):\n        scrape()\n        await channel.send(f\"{get_title(soup)} is {get_availability(soup)} for {get_price(soup)}\")\n\n    await bot.process_commands(message)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Main_Code_Body\"><\/span>Main Code Body<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>After making all of those functions, the main body of the code became hilariously short.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if __name__ == \"__main__\":\n\n    bot.run(token, reconnect=True)<\/code><\/pre>\n\n\n\n<p>Seriously. That\u2019s it. The bot calls everything else at the appropriate times.<\/p>\n\n\n\n<p class=\"has-text-align-center\">Also read: <strong><a href=\"https:\/\/kocerroxy.com\/blog\/rotating-residential-proxies\/\">Top 5 Best Rotating Residential Proxies<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Q1_Is_there_an_alarm_bot_for_Discord\"><\/span>Q1. Is there an alarm bot for Discord?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Yes, there are alarm bots for Discord that you can use to set reminders or notifications directly within your Discord server! These bots can be super handy for setting up alarms for specific times, deadlines, events, or even recurring reminders for server members.<\/p>\n\n\n\n<p>One popular bot for this is <strong>Reminder Bot<\/strong>. It allows you to schedule one-time or recurring reminders that ping a channel or a specific user at the set time. It\u2019s easy to use: once added to your Discord server, you just type commands to set your alarm. For example, you could type <code>!remindme 30m Take a break!<\/code> to set an alarm that goes off in 30 minutes.<\/p>\n\n\n\n<p>If you want more advanced customization, there\u2019s <strong>Mee6<\/strong> and <strong>Dyno Bot<\/strong> as well, which have reminder features alongside other server management tools. Plus, if you\u2019re familiar with coding, you could even create your own alarm bot using Python and the <code>discord.py<\/code> library for maximum flexibility.<\/p>\n\n\n\n<p>Just invite a bot that suits your needs, and you\u2019re all set to create alarms in your Discord server!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Q2_How_to_loop_a_task_in_Python\"><\/span>Q2. How to loop a task in Python?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To loop a task in Python, you can use a simple <code>while<\/code> loop or <code>for<\/code> loop depending on how long you want the loop to run. For example, let\u2019s say you\u2019re building a bot for a Discord server and you want it to check every few seconds if there\u2019s a new message to send or task to do.<\/p>\n\n\n\n<p>Here\u2019s a basic example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pythonCopy code<code>import time\n\nwhile True:\n    # Your task, like checking for new messages\n    print(\"Checking for updates...\")\n    \n    # Wait 10 seconds before looping again\n    time.sleep(10)\n<\/code><\/pre>\n\n\n\n<p>This code will print &#8220;Checking for updates&#8230;&#8221; every 10 seconds. The <code>time.sleep(10)<\/code> line is important because it tells Python to wait 10 seconds before starting the loop again, which is helpful to avoid overloading your Discord server.<\/p>\n\n\n\n<p>If you\u2019re using an asynchronous library like <code>discord.py<\/code> for Discord bots, you\u2019d use <code>async<\/code> and <code>await<\/code> to handle looping tasks more efficiently without blocking other parts of your code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pythonCopy code<code>import discord\nimport asyncio\n\nclient = discord.Client()\n\nasync def loop_task():\n    await client.wait_until_ready()\n    while not client.is_closed():\n        # Task to run in the loop\n        print(\"Doing a repeating task...\")\n        \n        # Pause for 10 seconds\n        await asyncio.sleep(10)\n\nclient.loop.create_task(loop_task())\nclient.run(\"YOUR_BOT_TOKEN\")<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-center\">Also read: <strong><a href=\"https:\/\/kocerroxy.com\/blog\/residential-or-datacenter-proxies-for-shopify-bots\/\" target=\"_blank\" rel=\"noreferrer noopener\">Residential or Datacenter Proxies for Shopify Bots<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>And that\u2019s a wrap! It may seem like a lot at first glance, but it&#8217;s not all that bad. The code itself is fairly lean; I just wanted to thoroughly cover everything involved.<\/p>\n\n\n\n<p>With a little effort, you could enhance the sophistication of several aspects of this bot. For example, you could have the bot dynamically update what pages it scrapes as well as how often.<\/p>\n\n\n\n<p><a href=\"https:\/\/kocerroxy.com\/blog\/how-to-get-a-ps5-at-retail-price\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Buying a PS5 at retail price<\/strong><\/a> is as big of a challenge as the games you can play on it. No matter how frequently you have your bot run its checks, you\u2019ll have an advantage over anyone not following a tracker. Using <a href=\"https:\/\/kocerroxy.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>KocerRoxy<\/strong><\/a>\u2019s competitively priced rotating residential IP proxy service will let your Discord bot for availability alerts scrape more often, further increasing that advantage. And then maybe do some <strong><a href=\"https:\/\/kocerroxy.com\/blog\/data-parsing-with-proxies\/\" target=\"_blank\" rel=\"noreferrer noopener\">data parsing<\/a><\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Miss fewer restocks! Build a PS5 Discord bot for availability alerts and learn how to set it up step-by-step.<\/p>\n","protected":false},"author":3,"featured_media":1036,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[139],"tags":[27,33,31,24],"class_list":["post-1964","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-scraping","tag-bots","tag-discord","tag-ps5","tag-web-scraping"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Make a Discord Bot for Availability Alerts - KocerRoxy<\/title>\n<meta name=\"description\" content=\"Miss fewer restocks! Build a PS5 Discord bot for availability alerts and learn how to set it up step-by-step.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Make a Discord Bot for Availability Alerts - KocerRoxy\" \/>\n<meta property=\"og:description\" content=\"Miss fewer restocks! Build a PS5 Discord bot for availability alerts and learn how to set it up step-by-step.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/\" \/>\n<meta property=\"og:site_name\" content=\"KocerRoxy\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/TheHelenBold\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-04T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-23T11:05:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kocerroxy.com\/blog\/wp-content\/uploads\/2023\/08\/Discord-bot-for-availability-alerts.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Helen Bold\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@TheHelenBold\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Helen Bold\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/\"},\"author\":{\"name\":\"Helen Bold\",\"@id\":\"https:\/\/kocerroxy.com\/blog\/#\/schema\/person\/c9c9120b90dac4268b7012486a55074c\"},\"headline\":\"How to Make a Discord Bot for Availability Alerts\",\"datePublished\":\"2022-05-04T00:00:00+00:00\",\"dateModified\":\"2025-06-23T11:05:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/\"},\"wordCount\":2589,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kocerroxy.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/kocerroxy.com\/blog\/wp-content\/uploads\/2023\/08\/Discord-bot-for-availability-alerts.jpg\",\"keywords\":[\"bots\",\"Discord\",\"PS5\",\"web scraping\"],\"articleSection\":[\"Web Scraping\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/\",\"url\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/\",\"name\":\"How to Make a Discord Bot for Availability Alerts - KocerRoxy\",\"isPartOf\":{\"@id\":\"https:\/\/kocerroxy.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/kocerroxy.com\/blog\/wp-content\/uploads\/2023\/08\/Discord-bot-for-availability-alerts.jpg\",\"datePublished\":\"2022-05-04T00:00:00+00:00\",\"dateModified\":\"2025-06-23T11:05:56+00:00\",\"description\":\"Miss fewer restocks! Build a PS5 Discord bot for availability alerts and learn how to set it up step-by-step.\",\"breadcrumb\":{\"@id\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#primaryimage\",\"url\":\"https:\/\/kocerroxy.com\/blog\/wp-content\/uploads\/2023\/08\/Discord-bot-for-availability-alerts.jpg\",\"contentUrl\":\"https:\/\/kocerroxy.com\/blog\/wp-content\/uploads\/2023\/08\/Discord-bot-for-availability-alerts.jpg\",\"width\":900,\"height\":600,\"caption\":\"Discord bot for availability alerts\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/kocerroxy.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Make a Discord Bot for Availability Alerts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kocerroxy.com\/blog\/#website\",\"url\":\"https:\/\/kocerroxy.com\/blog\/\",\"name\":\"Kocerroxy\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kocerroxy.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kocerroxy.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kocerroxy.com\/blog\/#organization\",\"name\":\"Kocerroxy\",\"url\":\"https:\/\/kocerroxy.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kocerroxy.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kocerroxy.com\/wp-content\/uploads\/2023\/07\/Favicon.png\",\"contentUrl\":\"https:\/\/kocerroxy.com\/wp-content\/uploads\/2023\/07\/Favicon.png\",\"width\":512,\"height\":512,\"caption\":\"Kocerroxy\"},\"image\":{\"@id\":\"https:\/\/kocerroxy.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kocerroxy.com\/blog\/#\/schema\/person\/c9c9120b90dac4268b7012486a55074c\",\"name\":\"Helen Bold\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kocerroxy.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7624887d3556e306a0883ab27fba8ad89c7f315532399aacf4e5cd49014bc658?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7624887d3556e306a0883ab27fba8ad89c7f315532399aacf4e5cd49014bc658?s=96&d=mm&r=g\",\"caption\":\"Helen Bold\"},\"description\":\"Helen Bold has been writing about proxies since 2020. Helen specializes in gathering details, checking facts, and bringing value to our readers. In addition to writing articles, Helen does in-depth research and analyzes proxy industry trends. In her free time, she also writes amazing novels. You can read more about her personal work here: helenbold.com\",\"sameAs\":[\"http:\/\/helenbold.com\",\"https:\/\/www.facebook.com\/TheHelenBold\",\"https:\/\/www.instagram.com\/helenboldwriter\/\",\"https:\/\/x.com\/TheHelenBold\"],\"url\":\"https:\/\/kocerroxy.com\/blog\/author\/helen-b\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Make a Discord Bot for Availability Alerts - KocerRoxy","description":"Miss fewer restocks! Build a PS5 Discord bot for availability alerts and learn how to set it up step-by-step.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/","og_locale":"en_US","og_type":"article","og_title":"How to Make a Discord Bot for Availability Alerts - KocerRoxy","og_description":"Miss fewer restocks! Build a PS5 Discord bot for availability alerts and learn how to set it up step-by-step.","og_url":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/","og_site_name":"KocerRoxy","article_author":"https:\/\/www.facebook.com\/TheHelenBold","article_published_time":"2022-05-04T00:00:00+00:00","article_modified_time":"2025-06-23T11:05:56+00:00","og_image":[{"width":900,"height":600,"url":"https:\/\/kocerroxy.com\/blog\/wp-content\/uploads\/2023\/08\/Discord-bot-for-availability-alerts.jpg","type":"image\/jpeg"}],"author":"Helen Bold","twitter_card":"summary_large_image","twitter_creator":"@TheHelenBold","twitter_misc":{"Written by":"Helen Bold","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#article","isPartOf":{"@id":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/"},"author":{"name":"Helen Bold","@id":"https:\/\/kocerroxy.com\/blog\/#\/schema\/person\/c9c9120b90dac4268b7012486a55074c"},"headline":"How to Make a Discord Bot for Availability Alerts","datePublished":"2022-05-04T00:00:00+00:00","dateModified":"2025-06-23T11:05:56+00:00","mainEntityOfPage":{"@id":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/"},"wordCount":2589,"commentCount":0,"publisher":{"@id":"https:\/\/kocerroxy.com\/blog\/#organization"},"image":{"@id":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#primaryimage"},"thumbnailUrl":"https:\/\/kocerroxy.com\/blog\/wp-content\/uploads\/2023\/08\/Discord-bot-for-availability-alerts.jpg","keywords":["bots","Discord","PS5","web scraping"],"articleSection":["Web Scraping"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/","url":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/","name":"How to Make a Discord Bot for Availability Alerts - KocerRoxy","isPartOf":{"@id":"https:\/\/kocerroxy.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#primaryimage"},"image":{"@id":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#primaryimage"},"thumbnailUrl":"https:\/\/kocerroxy.com\/blog\/wp-content\/uploads\/2023\/08\/Discord-bot-for-availability-alerts.jpg","datePublished":"2022-05-04T00:00:00+00:00","dateModified":"2025-06-23T11:05:56+00:00","description":"Miss fewer restocks! Build a PS5 Discord bot for availability alerts and learn how to set it up step-by-step.","breadcrumb":{"@id":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#primaryimage","url":"https:\/\/kocerroxy.com\/blog\/wp-content\/uploads\/2023\/08\/Discord-bot-for-availability-alerts.jpg","contentUrl":"https:\/\/kocerroxy.com\/blog\/wp-content\/uploads\/2023\/08\/Discord-bot-for-availability-alerts.jpg","width":900,"height":600,"caption":"Discord bot for availability alerts"},{"@type":"BreadcrumbList","@id":"https:\/\/kocerroxy.com\/blog\/how-to-make-a-discord-bot-for-availability-alerts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kocerroxy.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Make a Discord Bot for Availability Alerts"}]},{"@type":"WebSite","@id":"https:\/\/kocerroxy.com\/blog\/#website","url":"https:\/\/kocerroxy.com\/blog\/","name":"Kocerroxy","description":"","publisher":{"@id":"https:\/\/kocerroxy.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kocerroxy.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kocerroxy.com\/blog\/#organization","name":"Kocerroxy","url":"https:\/\/kocerroxy.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kocerroxy.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/kocerroxy.com\/wp-content\/uploads\/2023\/07\/Favicon.png","contentUrl":"https:\/\/kocerroxy.com\/wp-content\/uploads\/2023\/07\/Favicon.png","width":512,"height":512,"caption":"Kocerroxy"},"image":{"@id":"https:\/\/kocerroxy.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kocerroxy.com\/blog\/#\/schema\/person\/c9c9120b90dac4268b7012486a55074c","name":"Helen Bold","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kocerroxy.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7624887d3556e306a0883ab27fba8ad89c7f315532399aacf4e5cd49014bc658?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7624887d3556e306a0883ab27fba8ad89c7f315532399aacf4e5cd49014bc658?s=96&d=mm&r=g","caption":"Helen Bold"},"description":"Helen Bold has been writing about proxies since 2020. Helen specializes in gathering details, checking facts, and bringing value to our readers. In addition to writing articles, Helen does in-depth research and analyzes proxy industry trends. In her free time, she also writes amazing novels. You can read more about her personal work here: helenbold.com","sameAs":["http:\/\/helenbold.com","https:\/\/www.facebook.com\/TheHelenBold","https:\/\/www.instagram.com\/helenboldwriter\/","https:\/\/x.com\/TheHelenBold"],"url":"https:\/\/kocerroxy.com\/blog\/author\/helen-b\/"}]}},"_links":{"self":[{"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/posts\/1964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/comments?post=1964"}],"version-history":[{"count":5,"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/posts\/1964\/revisions"}],"predecessor-version":[{"id":7408,"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/posts\/1964\/revisions\/7408"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/media\/1036"}],"wp:attachment":[{"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/media?parent=1964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/categories?post=1964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kocerroxy.com\/blog\/wp-json\/wp\/v2\/tags?post=1964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}