Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import requests
- import asyncio
- import time
- import random
- from discord.ext import commands
- import Config
- bot = commands.Bot(command_prefix='tb!')
- @bot.command(pass_context=True)
- async def info(ctx):
- embed=discord.Embed(title="TutorialBot", description="TutorialBot is a bot created for a tutorial by RedstonedLife", color=0x00ff80)
- embed.add_field(name="ValueName", value="Thevalue", inline=False)
- embed.set_footer(text="Footer text :D")
- await ctx.send(embed=embed)
- @bot.command(pass_context=True)
- async def ping(ctx):
- """Pong"""
- before = time.monotonic()
- message = await ctx.send("Pong!")
- ping = (time.monotonic() - before) * 1000
- await message.edit(content=f'Pong! `{int(ping)}ms`')
- @bot.event
- async def on_ready():
- print("Bot is ready for usage!")
- bot.run(Config.token)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement