interactions.py icon indicating copy to clipboard operation
interactions.py copied to clipboard

feat!: Implement ``AllowedMentions`` object

Open Damego opened this issue 3 years ago • 1 comments

About

This pull request adds AllowedMentions and AllowedMentionTypes objects to work with allowed_mentions

Checklist

  • [x] I've ran pre-commit to format and lint the change(s) made.
  • [x] I've checked to make sure the change(s) work on 3.8.6 and higher.
  • [ ] This fixes/solves an Issue (If existent):.
    • resolves #
  • I've made this pull request for/as: (check all that apply)
    • [x] Documentation
    • [x] Breaking change
    • [x] New feature/enhancement
    • [ ] Bugfix

Damego avatar Aug 03 '22 18:08 Damego

I don't want this to be breaking, so please add an _._json if isinstance(_, Class) else _ condition to where allowed mentions is used

Okay. Will do. What about typehinting?

  1. Keep current.
  2. Optional[Union[AllowedMentions, Dict[str, list]]]
  3. Optional[Union[AllowedMentions, Dict[str, List[Union[str, int]]]]]
  4. Optional[Union[AllowedMentions, dict]]

Damego avatar Aug 10 '22 04:08 Damego

I don't want this to be breaking, so please add an _._json if isinstance(_, Class) else _ condition to where allowed mentions is used

Okay. Will do. What about typehinting?

  1. Keep current.
  2. Optional[Union[AllowedMentions, Dict[str, list]]]
  3. Optional[Union[AllowedMentions, Dict[str, List[Union[str, int]]]]]
  4. Optional[Union[AllowedMentions, dict]]

Late response, sorry, 4 is fine

EepyElvyra avatar Aug 12 '22 23:08 EepyElvyra

Done

Damego avatar Aug 18 '22 14:08 Damego