Last active
September 13, 2021 11:29
-
-
Save NixonXC/1b7d3a4c64ce56a1888d9183eb16dabe to your computer and use it in GitHub Desktop.
Example of a simple Bot made with PyCord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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