interactions.py
                                
                                 interactions.py copied to clipboard
                                
                                    interactions.py copied to clipboard
                            
                            
                            
                        feat: add fail_if_not_exists for PrefixedContext.reply
Pull Request Type
- [x] Feature addition
- [ ] Bugfix
- [ ] Documentation update
- [ ] Code refactor
- [ ] Tests improvement
- [ ] CI/CD pipeline enhancement
- [ ] Other: [Replace with a description]
Description
This is a simple PR to add fail_if_not_exists to PrefixedContext.reply. Really, I have to question why fail_if_not_exists doesn't default to False - regardless, people at least have the option now.
Changes
- Add fail_if_not_existstoPrefixedContext.reply.
Related Issues
Test Scenarios
@prefixed_command()
async def some_cmd(ctx: PrefixedContext):
    await ctx.message.delete()
    await ctx.reply("Hello!")  # will fail
    # meanwhile, await ctx.reply("Hello!", fail_if_not_exists=False) will work with this PR
Python Compatibility
- [ ] I've ensured my code works on Python 3.10.x
- [x] I've ensured my code works on Python 3.11.x
Checklist
- [x] I've run the pre-commitcode linter over all edited files
- [x] I've tested my changes on supported Python versions
- [ ] I've added tests for my code, if applicable
- [ ] I've updated / added documentation, where applicable