Skip to content

Instantly share code, notes, and snippets.

@mpsparrow
Created April 18, 2020 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpsparrow/6678c24139bdad4b45bcdbf5536ed89d to your computer and use it in GitHub Desktop.
Save mpsparrow/6678c24139bdad4b45bcdbf5536ed89d to your computer and use it in GitHub Desktop.
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