Skip to content

Instantly share code, notes, and snippets.

@bluepanda280
Created May 25, 2024 22:43
Show Gist options
  • Save bluepanda280/1d999e78da08e66a89e74914f4e70261 to your computer and use it in GitHub Desktop.
Save bluepanda280/1d999e78da08e66a89e74914f4e70261 to your computer and use it in GitHub Desktop.
Basic Discord.py Bot Starter Code And Instructions
# Step 1. Install python though The Website, And Install Discord.py By Going To CMD And Typing In "pip install discord.py"
# Step 2. Create Discord Bot At Discord Developer Portal And Invite You Discord Bot To Your server
# Step 3. Copy The Token And Paste It In Line 21 Where It Says Enter Token Here
# Step 4. Press Play (If Your In Visual Studio Code) And Type !test in discord
import discord
from discord.ext import commands
client = commands.bot(command_prefix = '!')
@client.event
async def on_ready():
print("The Bot Is Now Online And Ready To Use Commands")
print("-----------------------------------------------")
@client.command()
async def test(ctx):
await ctx.send("Bot Works <3 🙏")
client.run('ENTER TOKEN HERE')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment