A modern, async-ready Python API wrapper for Discord with comprehensive bot development features
Overall
score
93%
Build a Discord bot that logs administrative actions in a server to help server moderators track changes.
Create a Discord bot with a /recent_actions slash command that:
@generates
import discord
from discord.ext import commands
class AuditLogger(commands.Cog):
"""Cog for logging guild administrative actions."""
def __init__(self, bot: commands.Bot):
"""Initialize the audit logger."""
pass
@commands.slash_command(name="recent_actions", description="Display recent administrative actions")
async def recent_actions(self, ctx: discord.ApplicationContext):
"""Fetch and display the 5 most recent administrative actions."""
pass/recent_actions is invoked in a guild with no recent actions, the bot responds with a message indicating no actions found @test/recent_actions is invoked in a guild with 3 role creation actions, the bot displays those 3 actions with their timestamps and responsible users @test/recent_actions is invoked in a guild with 5 member kick actions that include reasons, the bot displays all 5 actions with their reasons @testProvides Discord bot functionality and audit log access.
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