-
Notifications
You must be signed in to change notification settings - Fork 2
/
gTime.py
36 lines (29 loc) · 983 Bytes
/
gTime.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
######################################################################################################
#
# Organization: Asociacion De Investigacion En Inteligencia Artificial Para La Leucemia Peter Moss
# Repository: GeniSysAI
# Project: Natural Language Understanding Engine
#
# Author: Adam Milton-Barker (AdamMiltonBarker.com)
#
# Title: gTime Extension Class
# Description: Responds to time requests.
# License: MIT License
# Last Modified: 2020-10-01
#
######################################################################################################
import os
import time
import json
import random
from datetime import datetime
class gTime():
""" gTime Extension Class
Responds to time requests.
"""
def __init__(self):
""" Initializes the class. """
pass
def getTime(self, responses, entities):
""" Updates current time in random response. """
return random.choice(responses).replace("%%TIME%%", time.strftime("%c"))