Compare commits

...

3 commits

Author SHA1 Message Date
d38345c3d9 add admin deleteword command 2022-05-17 23:04:29 -04:00
9d9c9dcd34 fix recording nouns
i should not be allowed near a computer
2022-05-17 22:26:01 -04:00
3e1c3dac5b
fox comment wording 2022-05-13 21:55:28 -04:00
2 changed files with 20 additions and 2 deletions

View file

@ -90,6 +90,21 @@ async def shut(self, c, n, m):
await self.message(c, "Ok, il be back in 10 minutes")
async def deleteword(self, c, n, m):
starttime = time.time()
deleteme = m.split()
shared.db["conver"].delete(pre=deleteme)
shared.db["prew"].delete(pre=deleteme)
shared.db["conver"].delete(pro=deleteme)
shared.db["prew"].delete(pro=deleteme)
shared.db["noun"].delete(word=deleteme)
shared.db["beg"].delete(word=deleteme)
shared.db["end"].delete(word=deleteme)
await self.message(
c, f"word(s) deleted in {round(time.time()-starttime,2)} seconds"
)
async def schans(self, c, n, m):
self.chandb.delete()
for i in self.channels:
@ -246,6 +261,7 @@ commands = {
"send": send,
"joins": joins,
"shut": shut,
"deleteword": deleteword,
"schans": schans,
"addalias": addalias,
"addcommand": addcommand,

View file

@ -40,7 +40,7 @@ async def rec(self, m):
),
["id"],
)
noch.insert(dict(word=w))
noch.insert(dict(word=get(words, w)))
async def getNoun(self, words, c):
@ -127,6 +127,8 @@ async def genOut(self, noun):
elif coun >= shared.maxiter:
shared.enmul -= 1
print(f"coun {coun} enmul {shared.enmul} maxiter {shared.maxiter}")
return out
@ -172,7 +174,7 @@ async def init(self):
# learning.
shared.learndelay = 1
# sentance ending weight, higher means longer sentances,
# higher means shorter sentances. this will need to slowly
# lower means shorter sentances. this will need to slowly
# get larger as the database grows
shared.enmul = 200
shared.maxiter = 14