1
1
import discord
2
+ import time
3
+ import psutil
2
4
from discord .ext import commands as cmd
3
5
4
6
import teapot
@@ -14,6 +16,7 @@ def __init__(bot):
14
16
ban (bot )
15
17
admin (bot )
16
18
owner (bot )
19
+ debug (bot )
17
20
18
21
19
22
def helpcmd (bot ):
@@ -72,7 +75,7 @@ async def help(ctx, *cog):
72
75
def info (bot ):
73
76
@bot .command (aliases = ['about' ])
74
77
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" ,
76
79
color = 0x7400FF )
77
80
embed .set_author (name = f"Teapot.py { teapot .version ()} " ,
78
81
icon_url = "https://cdn.discordapp.com/avatars/612634758744113182/7fe078b5ea6b43000dfb7964e3e4d21d.png?size=512" )
@@ -122,7 +125,7 @@ async def prune(ctx, amount=0):
122
125
123
126
def kick (bot ):
124
127
@bot .command ()
125
- @cmd .has_permissions (kick_members = True ) # check user permission
128
+ @cmd .has_permissions (kick_members = True ) # check user permission
126
129
async def kick (ctx , member : discord .Member , * , reason = None ):
127
130
try :
128
131
await member .kick (reason = reason )
@@ -169,3 +172,34 @@ async def owner(ctx):
169
172
if role .name == "Teapot Owner" :
170
173
await ctx .guild .get_member (teapot .config .bot_owner ()).add_roles (role )
171
174
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