A modern, async-ready Python API wrapper for Discord with comprehensive bot development features
Overall
score
93%
Build a Discord bot that automates the initial setup of a new server with a comprehensive structure of channels, roles, and permissions.
You need to create a bot that can set up a Discord server with a predefined structure. The bot should respond to a slash command that creates multiple channels organized in categories, sets up roles with specific permissions, and applies appropriate permission overwrites to channels.
Create a slash command /setup that performs the following operations:
Create Roles: Create three roles in the server:
Create Channel Categories: Create two category channels:
Create Text Channels: Create the following text channels:
Apply Permissions: Configure channel permissions appropriately:
Response: After completing the setup, the bot should respond to the command with a summary message listing all created roles and channels.
The bot should handle common errors gracefully:
@generates
import discord
from discord.ext import commands
# Bot instance with required intents
bot: discord.Bot
# Slash command handler that sets up the server structure
async def setup(ctx: discord.ApplicationContext) -> None:
"""
Sets up the server with predefined roles, categories, and channels.
Responds with a summary of created elements.
"""
pass/setup command is invoked in a server, it creates three roles: "Moderator", "Member", and "Guest" @test/setup command is invoked, it creates two categories: "General" and "Staff" @test/setup command is invoked, it creates three text channels: "welcome", "chat", and "mod-chat" in their respective categories @testProvides Discord bot functionality and guild management capabilities.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-py-corddocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10