mirror of
https://github.com/tildeclub/ttbp.git
synced 2026-06-20 19:39:23 +00:00
added chatter function
This commit is contained in:
14
bin/chatter.py
Normal file
14
bin/chatter.py
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import random
|
||||
import json
|
||||
import os
|
||||
|
||||
SOURCE = os.path.join("/home", "endorphant", "projects", "ttbp")
|
||||
langfile = open(os.path.join(SOURCE, "lib", "lang.json"), 'r')
|
||||
LANG = json.load(langfile)
|
||||
langfile.close()
|
||||
|
||||
def say(keyword):
|
||||
|
||||
return random.choice(LANG.get(keyword))
|
||||
Reference in New Issue
Block a user