Skip to content

Instantly share code, notes, and snippets.

@mpsparrow
Created April 18, 2020 00:53
Starter Discord bot using discordpy
'''
Bot Name:
Creator:
Version:
Date Updated:
Date Created:
'''
import discord
from discord.ext import commands
token = 1234567890
prefix = "bot?"
bot = commands.Bot(command_prefix=prefix)
# runs on startup
@bot.event
async def on_ready():
print("Started!")
# simple ping command
@bot.command(name='ping', description='pings bot', usage='ping', aliases=['p'])
async def ping(ctx):
await ctx.send("pong!")
# runs bot
bot.run(token)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment