Futurism › class › dAmnProperty
From Botdom Documentation
The dAmnProperty class turns a property packet into an easily parsable object.
Properties
- str name — The property name.
- str value — The property value.
Additionally, if there is information on who set the property:
- str by — User who set the property.
Additionally, if there is a timestamp on when the property was set:
- str ts — Unix-style timestamp on when the property was set.
Initialization
Parses the dAmnPacketI object instance and sets the properties seen above, which can then be refered to for information.
pkt = dAmnPacketI("property chat:elec\np=topic\nby=electricnet\nts=1219854021\n\nHello! :D") prop = dAmnProperty(pkt) # prop.by is: electricnet # prop.name is: topic # prop.ts is: 1219854021 # prop.value is: Hello! :D
String
When the dAmnProperty object instance is accessed as a string, it returns the actual value of the topic, in other words, the property value.
s = str(prop) # s is: Hello! :D

