11import discord
2+ import time
3+ import psutil
24from discord .ext import commands as cmd
35
46import teapot
@@ -14,6 +16,7 @@ def __init__(bot):
1416 ban (bot )
1517 admin (bot )
1618 owner (bot )
19+ debug (bot )
1720
1821
1922def helpcmd (bot ):
@@ -72,7 +75,7 @@ async def help(ctx, *cog):
7275def info (bot ):
7376 @bot .command (aliases = ['about' ])
7477 async def info (ctx ):
75- embed = discord .Embed (title = "Developers: RedTea , ColaIan" , description = "Multi-purpose Discord Bot" ,
78+ embed = discord .Embed (title = "Developers: RedTeaDev , ColaIan" , description = "Multi-purpose Discord Bot" ,
7679 color = 0x7400FF )
7780 embed .set_author (name = f"Teapot.py { teapot .version ()} " ,
7881 icon_url = "https://cdn.discordapp.com/avatars/612634758744113182/7fe078b5ea6b43000dfb7964e3e4d21d.png?size=512" )
@@ -122,7 +125,7 @@ async def prune(ctx, amount=0):
122125
123126def kick (bot ):
124127 @bot .command ()
125- @cmd .has_permissions (kick_members = True ) # check user permission
128+ @cmd .has_permissions (kick_members = True ) # check user permission
126129 async def kick (ctx , member : discord .Member , * , reason = None ):
127130 try :
128131 await member .kick (reason = reason )
@@ -169,3 +172,34 @@ async def owner(ctx):
169172 if role .name == "Teapot Owner" :
170173 await ctx .guild .get_member (teapot .config .bot_owner ()).add_roles (role )
171174 break
175+
176+
177+ def debug (bot ):
178+ @bot .command ()
179+ @cmd .has_permissions (administrator = True )
180+ async def debug (ctx ):
181+ embed = discord .Embed (title = "Developers: RedTea, ColaIan" , description = "Debug info:" ,
182+ color = 0x7400FF )
183+ embed .set_author (name = f"Teapot.py { teapot .version ()} " ,
184+ icon_url = "https://cdn.discordapp.com/avatars/612634758744113182/7fe078b5ea6b43000dfb7964e3e4d21d.png?size=512" )
185+ embed .set_thumbnail (url = "https://avatars2.githubusercontent.com/u/60006969?s=200&v=4" )
186+ embed .add_field (name = "Bot User:" , value = bot .user , inline = True )
187+ embed .add_field (name = "System Time:" , value = time .strftime ("%a %b %d %H:%M:%S %Y" , time .localtime ()), inline = True )
188+ embed .add_field (name = "Memory" ,
189+ value = str (round (psutil .virtual_memory ()[1 ] / 1024 / 1024 / 1024 )) + "GB / " + str (round (
190+ psutil .virtual_memory ()[0 ] / 1024 / 1024 / 1024 )) + "GB" , inline = True )
191+ embed .add_field (name = "O.S.:" , value = str (teapot .platform ()), inline = True )
192+ embed .add_field (name = "Storage Type:" , value = teapot .config .storage_type (), inline = True )
193+ embed .add_field (name = "Prefix:" , value = ", " .join (teapot .config .bot_prefix ()), inline = True )
194+ embed .add_field (name = "Github Repo:" , value = "[Teapot.py](https://github.com/RedCokeDevelopment/Teapot.py)" ,
195+ inline = True )
196+ embed .add_field (name = "Bug Report:" , value = "[Issues](https://github.com/RedCokeDevelopment/Teapot.py/issues)" ,
197+ inline = True )
198+ embed .add_field (name = "Website:" , value = "[Website](https://teapot.page)" , inline = True )
199+ embed .add_field (name = "Links" ,
200+ value = "[Support Discord](https://discord.gg/7BRGs6F) | [Add bot to server](https://discordapp.com/oauth2/authorize?client_id=669880564270104586&permissions=8&scope=bot) | [Repository](https://github.com/RedCokeDevelopment/Teapot.py)" ,
201+ inline = False )
202+ embed .set_footer (text = f"{ teapot .copyright ()} | Code licensed under the MIT License" )
203+ # embed.set_image(url="https://user-images.githubusercontent.com/43201383/72987537-89830a80-3e25-11ea-95ef-ecfa0afcff7e.png")
204+ await ctx .message .author .send (embed = embed )
205+ await ctx .message .add_reaction (emoji = '✅' )
0 commit comments