Skip to content

Instantly share code, notes, and snippets.

@NixonXC
Last active September 13, 2021 11:29
Show Gist options
  • Save NixonXC/1b7d3a4c64ce56a1888d9183eb16dabe to your computer and use it in GitHub Desktop.
Save NixonXC/1b7d3a4c64ce56a1888d9183eb16dabe to your computer and use it in GitHub Desktop.
Example of a simple Bot made with PyCord
import discord # importing discord
from discord.ext import commands
client = commands.Bot(command_prefix='!') # You can choose your own prefix here
@client.event
async def on_ready():
print(f"Bot online and logged in as {client.user}")
# A simple command
@client.command()
async def ping(ctx):
await ctx.send("Pong!")
client.run('your token here') # Running the bot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment