Merge remote-tracking branch 'origin/master'

This commit is contained in:
2022-07-02 09:25:35 +03:00
2 changed files with 22 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
import logging
import discord
from discord.ext import commands
@@ -12,8 +13,23 @@ class Test_Cog(commands.Cog):
logging.info(f'Cog {__name__.split(".")[1]} is ready!.')
@commands.command() # this is for making a command
async def ping(self, ctx):
await ctx.send(f'Pong! {round(self.bot.latency * 1000)}')
async def bot_info(self, ctx, bot):
# await ctx.send(f'Pong! {round(self.bot.latency * 1000)}')
emb = discord.Embed(
title=f"General information",
description=f"General information on about {bot}",
icon=bot.avatar_url
)
emb.set_thumbnail(url=bot.avatar_url)
emb.add_field(name="General info",
value=f"Username: {bot}\n"
f"Nickname: {bot.nick}\n"
f"Joined at: {bot.joined_at.strftime('%A, %B %d %Y @ %H:%M:%S')}", inline=False)
# emb.add_field(name="Audio list", value=f"{audios}", inline=True)
# emb.add_field(name="Roles list", value=f"{roles}", inline=True)
emb.set_footer(text="Information requested by: {}".format(ctx.author.display_name))
await ctx.reply(embed=emb, ephemeral=True)
def setup(bot): # a extension must have a setup function