Last active
May 5, 2021 02:38
-
-
Save ajsya/2d80b8c00422010b9058a7747d3a3e71 to your computer and use it in GitHub Desktop.
Discord Bot Template
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
# 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