Creating a simple Discord bot (tutorial)

Hey everyone,
Here’s a simple tutorial for making a basic Discord bot using Python. This bot will automatically reply with "very cool" whenever anyone sends a message in any text channel on your server.
It’s a great starting point if:
1:You’re learning how Discord bots work
2:You want to test basic features
3:You plan to build something bigger later
Let’s jump in.
🧠 What the Bot Does
Every time someone types a message — any message — the bot replies in the same channel with "very cool" It doesn't matter what they type. It’ll just respond.
💻 The Code
Here’s the full code, ready to copy and run:
import discord
# Hardcoded bot token — only for testing/learning
TOKEN = "YOUR_BOT_TOKEN_HERE"
# Enable reading messages
intents = discord.Intents.default()
intents.message_content = True
# Create the bot client
client = discord.Client(intents=intents)
# Called when the bot connects to Discord
@client.event
async def on_ready():
print(f"Logged in as {client.user}")
# Called when any message is sent
@client.event
async def on_message(message):
if message.author.bot:
return # Skip messages from bots
await message.channel.send("very cool")
# Start the bot
client.run(TOKEN)
⚠️ Replace "YOUR_BOT_TOKEN_HERE" with the token you get from the Discord Developer Portal.
🛠️ How to Set It Up
Step 1: Create the Bot on Discord
Go to the Discord Developer Portal (make sure you have an account)
Click "New Application", give it a name
Go to the Bot tab → Click “Add Bot” (top right corner)
Step 2: Get the Token
In the Bot tab, click “Reset Token”
Copy the token and paste it into the TOKEN variable in your code
Step 3: Turn On Message Intent
In the Bot tab:
Scroll down and turn on MESSAGE CONTENT INTENT
This lets the bot read messages
Step 4: Invite the Bot to Your Server
Go to OAuth2 → URL Generator
Select:
Scopes → bot
Permissions → Read Messages/View Channels and Send Messages
Copy the link it gives you and open it in your browser to invite the bot
▶️ How to Run the Bot
Make sure you have Python installed.
1:Install the Discord library:
pip install discord.py
2:Save the code as bot.py (or what ever you want to really call it)
3:In your terminal, run:
python bot.py
(bot will be replaced with whatever you really named the file)
Your bot should come online and respond to every message in your server with "very cool".
🧱 Optional: Expand the Bot Later
Here are some easy ways to improve it later:
Only reply to certain words
if "hello" in message.content.lower():
await message.channel.send("hi there")
Reply directly to the user
await message.reply("very cool")
Add actual commands
from discord.ext import commands
bot = commands.Bot(command_prefix="!")
@bot.command()
async def ping(ctx):
await ctx.send("pong!")
well, that is about it, if you need any help or you want me to build you a custom bot go to this link to claim your free bot https://sites.google.com/view/yourdailybrick/home/request-a-bot if you need any help or you encounter any issues please comment :)
Subscribe to my newsletter
Read articles from YourDailyBrick directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
