1.1.0 #352
@ -21,6 +21,10 @@ class Achievement(TableABC):
|
||||
self._id = id
|
||||
self._name = name
|
||||
self._attribute = attribute
|
||||
|
||||
if operator not in ["==", "!=", "<=", ">=", "<", ">"]:
|
||||
raise ValueError("operator must be ==,!=,<=,>=,< or >")
|
||||
|
||||
self._operator = operator
|
||||
self._value = value
|
||||
self._server = server
|
||||
|
@ -3,6 +3,8 @@ type User implements TableWithHistoryQuery {
|
||||
discordId: String
|
||||
name: String
|
||||
xp: Int
|
||||
messageCount: Int
|
||||
reactionCount: Int
|
||||
ontime: Float
|
||||
level: Level
|
||||
|
||||
|
@ -41,6 +41,8 @@ class UserQuery(DataQueryWithHistoryABC):
|
||||
self.set_field("discordId", self.resolve_discord_id)
|
||||
self.set_field("name", self.resolve_name)
|
||||
self.set_field("xp", self.resolve_xp)
|
||||
self.set_field("messageCount", lambda x, *_: x.message_count)
|
||||
self.set_field("reactionCount", lambda x, *_: x.reaction_count)
|
||||
self.set_field("ontime", self.resolve_ontime)
|
||||
self.set_field("level", self.resolve_level)
|
||||
self.add_collection(
|
||||
|
Loading…
Reference in New Issue
Block a user