pycord
pycord copied to clipboard
on_auto_moderation_rule_X events TypeError
Summary
on_auto_moderation_rule_X events throw TypeErrors
Reproduction Steps
Try to use the events.
Minimal Reproducible Code
@commands.Cog.listener()
async def on_auto_moderation_rule_create(self, rule):
print(rule.guild.id)
Expected Results
A usable guild object.
Actual Results
TypeError: No 'dict' attribute on 'AutoModRule' instance to cache 'guild' property
Intents
auto_moderation_configuration, guilds, etc.
System Information
Python v3.10.6-final py-cord v2.4.None-final aiohttp v3.8.3 Linux 5.15.0-67-generic #74-Ubuntu
Checklist
- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.
Additional Context
No response
Please show the full traceback

This may be of help? https://github.com/Pycord-Development/pycord/blob/f8b4294ff06e0f700bcfe8c0ec13d0ec0085c7dd/discord/automod.py#L402-L405