Update __init__.py
This commit is contained in:
parent
fc74cda3ed
commit
64f140de82
1 changed files with 3 additions and 7 deletions
|
@ -565,15 +565,11 @@ async def _(msg: MessageSession):
|
|||
if msg.parsed_msg['<name>']:
|
||||
module_ = msg.parsed_msg['<name>']
|
||||
data_ = {}
|
||||
for d in range(29):
|
||||
new = datetime.now().replace(hour=0, minute=0, second=0) - timedelta(days=29 - d - 1)
|
||||
old = datetime.now().replace(hour=0, minute=0, second=0) - timedelta(days=29 - d)
|
||||
for d in range(30):
|
||||
new = datetime.now().replace(hour=0, minute=0, second=0) - timedelta(days=30 - d - 1)
|
||||
old = datetime.now().replace(hour=0, minute=0, second=0) - timedelta(days=30 - d)
|
||||
get_ = BotDBUtil.Analytics.get_count_by_times(new, old, module_)
|
||||
data_[old.day] = get_
|
||||
today = datetime.now().replace(hour=0, minute=0, second=0)
|
||||
now = datetime.now()
|
||||
data_.update({now.day: BotDBUtil.Analytics.get_count_by_times(now, today, module_)})
|
||||
print(data_)
|
||||
data_x = []
|
||||
data_y = []
|
||||
for x in data_:
|
||||
|
|
Reference in a new issue