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