|
|
@ -9,6 +9,36 @@ from discord.ext.commands import BucketType, cooldown, command
|
|
|
|
|
|
|
|
|
|
|
|
import settings
|
|
|
|
import settings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Perms = {"create instant invite": "",
|
|
|
|
|
|
|
|
"add reactions": "",
|
|
|
|
|
|
|
|
"view audit log": "",
|
|
|
|
|
|
|
|
"priority speaker": "",
|
|
|
|
|
|
|
|
"stream": "",
|
|
|
|
|
|
|
|
"read messages": "",
|
|
|
|
|
|
|
|
"send messages": "",
|
|
|
|
|
|
|
|
"send tts messages": "",
|
|
|
|
|
|
|
|
"embed links": "",
|
|
|
|
|
|
|
|
"attach links": "",
|
|
|
|
|
|
|
|
"read message history": "",
|
|
|
|
|
|
|
|
"external emojis": "",
|
|
|
|
|
|
|
|
"view guild insights": "",
|
|
|
|
|
|
|
|
"connect": "",
|
|
|
|
|
|
|
|
"speak": "",
|
|
|
|
|
|
|
|
"use voice activation": "",
|
|
|
|
|
|
|
|
"change nickname": ""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def DetectPermissions(message, dct):
|
|
|
|
|
|
|
|
message = message.split(",")
|
|
|
|
|
|
|
|
new_msg = ""
|
|
|
|
|
|
|
|
for word in message:
|
|
|
|
|
|
|
|
if word not in dct:
|
|
|
|
|
|
|
|
print(word)
|
|
|
|
|
|
|
|
new_msg += word + ", "
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
return new_msg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GetInfo(commands.Cog):
|
|
|
|
class GetInfo(commands.Cog):
|
|
|
|
def __init__(self, bot):
|
|
|
|
def __init__(self, bot):
|
|
|
@ -54,7 +84,7 @@ class GetInfo(commands.Cog):
|
|
|
|
pass
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
# Capitalise every word in the array and get rid of the ", " at the end of the string
|
|
|
|
# Capitalise every word in the array and get rid of the ", " at the end of the string
|
|
|
|
permissions = string.capwords("".join(map(str, permission[0:-2])))
|
|
|
|
permissions = string.capwords("".join(map(str, DetectPermissions(permission, Perms)[0:-4])))
|
|
|
|
|
|
|
|
|
|
|
|
# Set up the embed to display everything about the user
|
|
|
|
# Set up the embed to display everything about the user
|
|
|
|
embed = Embed(
|
|
|
|
embed = Embed(
|
|
|
@ -70,8 +100,9 @@ class GetInfo(commands.Cog):
|
|
|
|
("Discrim", "#" + target.discriminator, True),
|
|
|
|
("Discrim", "#" + target.discriminator, True),
|
|
|
|
("Registered", target.created_at.strftime("%a, %b %d, %Y\n%I:%M:%S %p"), True),
|
|
|
|
("Registered", target.created_at.strftime("%a, %b %d, %Y\n%I:%M:%S %p"), True),
|
|
|
|
("Joined", target.joined_at.strftime("%a, %b %d, %Y\n%I:%M:%S %p"), True),
|
|
|
|
("Joined", target.joined_at.strftime("%a, %b %d, %Y\n%I:%M:%S %p"), True),
|
|
|
|
|
|
|
|
("Top Role", target.top_role.mention, False),
|
|
|
|
("Roles", roles, False),
|
|
|
|
("Roles", roles, False),
|
|
|
|
("All Permissions", permissions, False),
|
|
|
|
("Key Permissions", permissions, False),
|
|
|
|
("Status", str(target.status).title(), True),
|
|
|
|
("Status", str(target.status).title(), True),
|
|
|
|
("Boosting Server", bool(target.premium_since), True),
|
|
|
|
("Boosting Server", bool(target.premium_since), True),
|
|
|
|
("Bot", target.bot, True)]
|
|
|
|
("Bot", target.bot, True)]
|
|
|
|