import discord
from discord.ext import commands
bot = commands.Bot(command_prefix='!', intents=discord.Intents.all())
@bot.event
async def on_ready():
print("Bot is up")
@bot.command()
async def test(ctx):
embed = discord.Embed(title='', description='the bot is working')
await ctx.send(embed=embed)
@bot.command()
async def ping(ctx):
latency = bot.latency
embed = discord.Embed(title='Pong!', description=f'Latency: {round(latency * 1000)}ms')
await ctx.send(embed=embed)
bot.run("your bot token") # https://discord.com/developers/applications
-
Notifications
You must be signed in to change notification settings - Fork 0
Ihsan-N/Python-Discord-Bot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published