Created
April 18, 2020 00:53
Starter Discord bot using discordpy
This file contains hidden or 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
''' | |
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