-
Notifications
You must be signed in to change notification settings - Fork 0
Onboarding brian #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideIntroduces a new Discord Cog for a ‘/todo’ onboarding command, implemented by defining a Cog class with logging, registering a guild-restricted slash command, constructing an embed response, and wiring it into the bot via an async setup function. Sequence Diagram for the /todo Command InteractionsequenceDiagram
actor User
participant Bot
participant todoCog
User->>Bot: /todo command
Bot->>todoCog: todo(interaction)
activate todoCog
todoCog->>todoCog: Create discord.Embed
todoCog-->>Bot: interaction.response.send_message(embed)
deactivate todoCog
Bot-->>User: Display "Todo List" Embed
Class Diagram for the New todoCogclassDiagram
class Cog {
<<discord.ext.commands.Cog>>
}
class Bot {
<<discord.ext.commands.Bot>>
}
class Interaction {
<<discord.Interaction>>
}
class Embed {
<<discord.Embed>>
}
class Logger {
<<logging.Logger>>
}
class todoCog {
+bot: Bot
+logger: Logger
+__init__(bot: Bot)
+todo(interaction: Interaction) async
}
todoCog --|> Cog
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @woweiseng - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| description="This is a list of tasks to be completed.", | ||
| color=colors.TODO, | ||
| ) | ||
| await interaction.response.send_message(embed=embed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Consider making this response ephemeral
Pass ephemeral=True if the message is only for the user, to prevent channel clutter.
| await interaction.response.send_message(embed=embed) | |
| await interaction.response.send_message(embed=embed, ephemeral=True) |
Summary by Sourcery
New Features: