0

Discord Example Bot

Free lines Python 1 revisions 180 4 months ago 4 months ago
import discord
from discord.ext import commands

bot = commands.Bot(command_prefix=commands.when_mentioned_or('insert prefix here'), description='Example Bot')


@bot.event
async def on_ready():
    print('Bot online!')
    print('Name: {}'.format(str(bot.user)))
    print('ID: {}'.format(str(bot.user.id)))

@bot.command(pass_context=True)
async def hello(ctx):
    await bot.say(f'Hi, {ctx.message.author.mention}')

bot.run('insert token here')

just a tiny starter python bot