Default time is now 16:00
This commit is contained in:
parent
94e229949d
commit
de483cd450
@ -43,7 +43,7 @@ class PyroUser:
|
|||||||
enabled: bool = True,
|
enabled: bool = True,
|
||||||
location_id: int = 0,
|
location_id: int = 0,
|
||||||
offset: int = 1,
|
offset: int = 1,
|
||||||
time_hour: int = 18,
|
time_hour: int = 16,
|
||||||
time_minute: int = 0,
|
time_minute: int = 0,
|
||||||
):
|
):
|
||||||
db_entry = await col_users.find_one({"id": id})
|
db_entry = await col_users.find_one({"id": id})
|
||||||
@ -108,7 +108,7 @@ class PyroUser:
|
|||||||
await col_users.update_one({"_id": self._id}, {"$set": {"offset": offset}})
|
await col_users.update_one({"_id": self._id}, {"$set": {"offset": offset}})
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
|
|
||||||
async def update_time(self, hour: int = 18, minute: int = 0) -> None:
|
async def update_time(self, hour: int = 16, minute: int = 0) -> None:
|
||||||
logger.debug("%s's time has been set to %s h. %s m.", self.id, hour, minute)
|
logger.debug("%s's time has been set to %s h. %s m.", self.id, hour, minute)
|
||||||
await col_users.update_one(
|
await col_users.update_one(
|
||||||
{"_id": self._id}, {"$set": {"time_hour": hour, "time_minute": minute}}
|
{"_id": self._id}, {"$set": {"time_hour": hour, "time_minute": minute}}
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
"enabled": true,
|
"enabled": true,
|
||||||
"location": 1,
|
"location": 1,
|
||||||
"offset": 1,
|
"offset": 1,
|
||||||
"time_hour": 18,
|
"time_hour": 16,
|
||||||
"time_minute": 0
|
"time_minute": 0
|
||||||
}
|
}
|
Reference in New Issue
Block a user