Creating formatted message boxes in Discord bot responses

I want to create a Discord bot that can send messages in formatted boxes similar to embedded responses. I’ve seen other bots that display information in colored sections with different text areas.

For example, I’d like my bot to show:

  • A header section with user information
  • A main content area with the actual message
  • A footer section with additional details like roles or reactions

The bot should be able to take user input and format it into these structured message blocks. I’m looking for guidance on how to implement this kind of formatted output in my Discord bot.

# Example of what I'm trying to achieve
import discord
from discord.ext import commands

bot = commands.Bot(command_prefix='!')

@bot.command()
async def feedback(ctx, *, content):
    # How do I create a formatted box here?
    # Want to display user suggestion in a structured format
    pass

What Discord features or libraries should I use to create these formatted message containers?

You want Discord’s embed system. I’ve been working with Discord bots for two years - embeds are hands down the best way to format structured messages. Create an embed object, set the color with hex codes, add fields with inline options, and throw in author info at the top. Use embed.add_field(name="Header", value="Content", inline=False) for your sections. For your feedback command, just create the embed, fill it with the user’s content and profile info, then send with await ctx.send(embed=embed). Looks way more professional than plain text and users can actually tell sections apart.

Discord embeds are perfect for this. I’ve built several bots using this exact setup - works great. Here’s how I’d structure your feedback command: Create the embed: discord.Embed(title="User Feedback", color=0x3498db); Add user info in header: embed.set_author(name=ctx.author.display_name, icon_url=ctx.author.avatar.url); Put main content in description: embed.description = content; Include role info in footer: embed.set_footer(text=f"Roles: {', '.join([role.name for role in ctx.author.roles[1:]])}"). Pro tip: stick to consistent colors across all your bot’s embeds. Makes everything look cleaner and users instantly recognize your bot’s responses.

totally, you should check out discord.Embed()! it lets you set title, description, color, and loads of other things. then, just send it using ctx.send(embed=your_embed) for that nice clean layout, includes fields and footers too!