| Total Complexity | 5 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import os |
||
| 2 | import re |
||
| 3 | import requests |
||
| 4 | import datetime |
||
| 5 | import random |
||
| 6 | import discord |
||
| 7 | from discord.ext import commands |
||
| 8 | from typing import Optional |
||
| 9 | from utils.global_utils import send_embedded |
||
| 10 | from utils import colors |
||
| 11 | |||
| 12 | |||
| 13 | class about(commands.Cog): |
||
| 14 | """about the bot, beep boop!!""" |
||
| 15 | |||
| 16 | def __init__(self, bot): |
||
| 17 | self.bot = bot |
||
| 18 | |||
| 19 | @commands.command() |
||
| 20 | async def ping(self, ctx): |
||
| 21 | """Pings the bot""" |
||
| 22 | await send_embedded(ctx, f"Pong! {round(self.bot.latency * 1000)}ms") |
||
| 23 | |||
| 24 | @commands.command() |
||
| 25 | async def info(self, ctx, args: str = None): |
||
| 26 | """ |
||
| 27 | Info about the bot. |
||
| 28 | """ |
||
| 29 | if str != "short": |
||
| 30 | embed = discord.Embed( |
||
| 31 | title="ISA_bot", |
||
| 32 | color=0xA8000D, |
||
| 33 | description="I'm a member of ISA family ❤️", |
||
| 34 | timestamp=datetime.datetime.utcnow(), |
||
| 35 | ) |
||
| 36 | embed.add_field(name="Command prefix", value="`!!`, `isa!`, `i!` or `@mention`") |
||
| 37 | embed.add_field( |
||
| 38 | name="\ud83c\udfa5Quick examples:", value="[Simple commands](https://i.imgur.com/BqgJZuQ.gif)" |
||
| 39 | ) |
||
| 40 | embed.add_field( |
||
| 41 | name="\ud83d\udd17 Bot source code", value="[Github Link](https://github.com/vinaydawani/ISA-bot)" |
||
| 42 | ) |
||
| 43 | embed.set_image(url="https://i.imgur.com/rO9MzrP.jpg") |
||
| 44 | embed.set_footer(text="Made by @External72#6969") |
||
| 45 | await ctx.send(embed=embed) |
||
| 46 | else: |
||
| 47 | await send_embedded(ctx, "[Github Link](https://github.com/vinaydawani/ISA-bot)") |
||
| 48 | |||
| 49 | await ctx.message.delete(delay=5) |
||
| 50 | |||
| 51 | |||
| 52 | def setup(bot): |
||
| 53 | bot.add_cog(about(bot)) |
||
| 54 |