Skip to content

Instantly share code, notes, and snippets.

@ajsya
Last active May 5, 2021 02:38
Show Gist options
  • Save ajsya/2d80b8c00422010b9058a7747d3a3e71 to your computer and use it in GitHub Desktop.
Save ajsya/2d80b8c00422010b9058a7747d3a3e71 to your computer and use it in GitHub Desktop.
Discord Bot Template
# Example Bot Template by SharkBaitBilly
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix='.')
@bot.event
async def on_ready():
print('Logged in as')
print(bot.user.name)
print(bot.user.id)
print('------')
@bot.command()
async def ping(ctx):
await ctx.send(":ping_pong: Pong!")
@bot.command()
async def embed(ctx):
embed = discord.Embed(
title = 'Discord Embed',
description = "Here's your embed!",
color = discord.Color.yellow())
embed.set_footer(text='Bot Template is a project by @SharkBaitBilly#5270')
# embed.set_thumbnail(url='')
#embed.set_author(name='Bot Template',
#icon_url='')
embed.add_field(name='Field', value='Field Content', inline=False)
await ctx.send(embed=embed)
TOKEN = "Example TOKEN"
bot.run(TOKEN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment