|
|
|
@ -16,8 +16,9 @@ class GetInfo(commands.Cog):
|
|
|
|
|
|
|
|
|
|
# ~userinfo to allow the users to see information about them relating to the guild
|
|
|
|
|
@command(name="userinfo", aliases=["ui"])
|
|
|
|
|
@cooldown(1, 1, BucketType.user)
|
|
|
|
|
@cooldown(1, 5, BucketType.user)
|
|
|
|
|
async def user_info(self, ctx, target: Optional[Member]):
|
|
|
|
|
|
|
|
|
|
# If a target has been specified, set them as the user
|
|
|
|
|
if target:
|
|
|
|
|
target = target
|
|
|
|
@ -82,11 +83,11 @@ class GetInfo(commands.Cog):
|
|
|
|
|
# Send the embed to the channel that the command was triggered in
|
|
|
|
|
await ctx.send(embed=embed)
|
|
|
|
|
|
|
|
|
|
# ~serverinfo to allow the users to see information the guild itself
|
|
|
|
|
@command(name="serverinfo", aliases=["guildinfo"])
|
|
|
|
|
@cooldown(1, 1, BucketType.user)
|
|
|
|
|
@cooldown(1, 5, BucketType.user)
|
|
|
|
|
async def server_info(self, ctx):
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
# Define guild icon and id
|
|
|
|
|
guild_icon = ctx.guild.icon_url
|
|
|
|
|
guild_id = ctx.guild.id
|
|
|
|
@ -127,9 +128,6 @@ class GetInfo(commands.Cog):
|
|
|
|
|
# Send the embed to the channel that the command was triggered in
|
|
|
|
|
await ctx.send(embed=embed)
|
|
|
|
|
|
|
|
|
|
except Exception as ex:
|
|
|
|
|
print(ex)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def setup(bot):
|
|
|
|
|
bot.add_cog(GetInfo(bot))
|
|
|
|
|