tessl install tessl/pypi-py-cord@2.6.0A modern, async-ready Python API wrapper for Discord with comprehensive bot development features
Agent Success
Agent success rate when using this tile
93%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.11x
Baseline
Agent success rate without this tile
84%
Build a Discord bot command that displays comprehensive server information using rich formatted messages.
Create a Discord bot with a slash command /serverinfo that displays detailed information about the current server (guild) in a well-formatted, visually appealing message.
The command should display:
The information should be presented in a rich, colored message format with:
Create test file: test_serverinfo.test.py
/serverinfo command is invoked, it responds with a formatted message containing server details @testProvides Discord bot functionality and API wrapper.
@generates
import discord
from discord.ext import commands
bot = discord.Bot()
@bot.slash_command(name="serverinfo", description="Display information about the server")
async def serverinfo(ctx):
"""Display comprehensive server information in a formatted message."""
pass
# Entry point to run the bot
def main():
"""Main function to start the bot."""
pass