-
How can I set an attribute to an object? For example I want to add 'FORUM' constant to a discord.Guild object.
and also
edit: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello, setting custom attributes on the libraries' types is not possible as they are slotted for a lower memory footprint. |
Beta Was this translation helpful? Give feedback.
Hello, setting custom attributes on the libraries' types is not possible as they are slotted for a lower memory footprint.
You'll have to assign these attributes to the client / bot or another namespace within your code, similar to your
self.GUILD
attribute.