1def server(self, ctx):
2 """Shows server info"""
3
4 server = ctx.message.server
5
6 roles = str(len(server.roles))
7 emojis = str(len(server.emojis))
8 channels = str(len(server.channels))
9
10 embeded = discord.Embed(title=server.name, description='Server Info', color=0xEE8700)
11 embeded.set_thumbnail(url=server.icon_url)
12 embeded.add_field(name="Created on:", value=server.created_at.strftime('%d %B %Y at %H:%M UTC+3'), inline=False)
13 embeded.add_field(name="Server ID:", value=server.id, inline=False)
14 embeded.add_field(name="Users on server:", value=server.member_count, inline=True)
15 embeded.add_field(name="Server owner:", value=server.owner, inline=True)
16
17 embeded.add_field(name="Default Channel:", value=server.default_channel, inline=True)
18 embeded.add_field(name="Server Region:", value=server.region, inline=True)
19 embeded.add_field(name="Verification Level:", value=server.verification_level, inline=True)
20
21 embeded.add_field(name="Role Count:", value=roles, inline=True)
22 embeded.add_field(name="Emoji Count:", value=emojis, inline=True)
23 embeded.add_field(name="Channel Count:", value=channels, inline=True)
24
25 await self.bot.say(embed=embeded)
1embed.add_field(name="Field 1 Title", value="[This is the text](Here is the URL)")
1def userinfo(self, ctx, *, user: discord.Member = None):
2 """
3 Get information about you, or a specified user.
4
5 `user`: The user who you want information about. Can be an ID, mention or name.
6 """
7
8 if user is None:
9 user = ctx.author
10
11 embed = discord.Embed(
12 colour=utils.user_colour(user),
13 title=f"{user.name}'s Stats and Information."
14 )
15 embed.set_footer(text=f"ID: {user.id}")
16 embed.set_thumbnail(url=user.avatar_url_as(format="png"))
17 embed.add_field(name="__**General information:**__", value=f"**Discord Name:** {user}\n"
18 f"**Account created:** {user.created_at.__format__('%A %d %B %Y at %H:%M')}\n"
19 f"**Status:** {utils.user_status(user)}\n"
20 f"**Activity:** {utils.user_activity(user)}", inline=False)
21 embed.add_field(name="__**Server-related information:**__", value=f"**Nickname:** {user.nick}\n"
22 f"**Joined server:** {user.joined_at.__format__('%A %d %B %Y at %H:%M')}\n"
23 f"**Roles:** {' '.join([r.mention for r in user.roles[1:]])}")
24 return await ctx.send(embed=embed)
1@client.event
2async def on_message(message):
3 if message.content.startswith('!hello'):
4 embedVar = discord.Embed(title="Title", description="Desc", color=0x00ff00)
5 embedVar.add_field(name="Field1", value="hi", inline=False)
6 embedVar.add_field(name="Field2", value="hi2", inline=False)
7 await message.channel.send(embed=embedVar)
8
1embed.add_field(name="Field 2 Title", value="It is inline with Field 3", inline=True)embed.add_field(name="Field 3 Title", value="It is inline with Field 2", inline=True)