arged responses#3418
Conversation
This add a args feature, for example if your arg is called `argreply`
You can do: `?reply Hello, read the following: {argreply}
fed5044
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com>
sebkuip
left a comment
There was a problem hiding this comment.
There are some issues in this PR that need to be addressed beforehand.
|
I discussed this with Lorenzo and removed this from this update to allow additional time for corrections while still working towards the important changes in 4.3.0 |
sebkuip
left a comment
There was a problem hiding this comment.
I found some bugs, and some typos. Please have these fixed. Thanks!
| if not self.bot.args: | ||
| embed = discord.Embed( | ||
| color=self.bot.error_color, | ||
| description="You dont have any args at the moment.", |
There was a problem hiding this comment.
Small typo here, pointed out by copilot. "don't" is missing it's apostrophe
| color=self.bot.error_color, | ||
| description="You dont have any args at the moment.", | ||
| ) | ||
| embed.set_footer(text=f'Check "{self.bot.prefix}help args add" to add an arg.') |
There was a problem hiding this comment.
I would change this text to See"{self.bot.prefix}help args add" for how to add an arg.
| """ | ||
| Add an arg. | ||
|
|
||
| Simply to add an arg, do: ``` |
|
|
||
| if self.bot.args: | ||
| msg = UnseenFormatter().format(msg, **self.bot.args) | ||
| msg = self.bot.formatter.format(msg, **self.bot.args) |
There was a problem hiding this comment.
The system breaks when an arg with a . character in the name is added. It tries to resolve it as an attribute causing either an <invalid> or an error to appear.
Using a string as an arg causes no reply and a silent error.


Using a forbidden arg causes an <invalid> to appear (here I did ?r testing {channel.name})

Formatreply correctly works and doesn't cause issues
This add a args feature, for example if your arg is called
argreplyYou can do: `?reply Hello, read the following: {argreply}