2020-11-23 21:39:51 +00:00
|
|
|
from bot import *
|
2020-05-23 22:18:27 +00:00
|
|
|
import random
|
|
|
|
|
|
|
|
async def owologger(self,c,n,m):
|
2020-08-02 02:31:05 +00:00
|
|
|
print("<{} {}> {}".format(c,n,m))
|
2020-11-23 21:39:51 +00:00
|
|
|
if m[:len(shared.prefix)] == shared.prefix:
|
2020-05-25 18:26:34 +00:00
|
|
|
return
|
2020-05-23 22:18:27 +00:00
|
|
|
if c not in self.owolog:
|
|
|
|
self.owolog[c] = []
|
|
|
|
|
|
|
|
self.owolog[c].append([n,m])
|
|
|
|
if len(self.owolog[c]) > 333:
|
|
|
|
del self.owolog[c][:-300]
|
|
|
|
|
|
|
|
async def owoify(self,c,n,m):
|
|
|
|
if len(m) < 1:
|
2020-07-02 14:53:56 +00:00
|
|
|
m = "1"
|
2020-05-23 22:18:27 +00:00
|
|
|
try:
|
2020-07-02 14:53:56 +00:00
|
|
|
back = int(m)+0
|
2020-05-23 22:18:27 +00:00
|
|
|
except:
|
2020-05-25 18:26:34 +00:00
|
|
|
back = 1
|
2020-05-23 22:18:27 +00:00
|
|
|
await self.message(c, await owotext(self, back, c))
|
|
|
|
|
|
|
|
async def owotext(self, back, chan):
|
|
|
|
if chan in self.owolog and len(self.owolog[chan]) >= back:
|
|
|
|
ms = self.owolog[chan][0-back]
|
2020-05-24 01:03:43 +00:00
|
|
|
ms[1] = ms[1].replace('r','w').replace('l','w').replace('uck','uwk')
|
2020-05-23 22:18:27 +00:00
|
|
|
return '<{}> {} {}'.format(ms[0],ms[1],random.choice(['owo','uwu','^w^','Owo?','OwO', 'oWo', 'UwU', 'uWu']))
|
|
|
|
return 'My backlog does not go back that far :('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def init(self):
|
|
|
|
self.owolog = {}
|
2020-11-23 21:39:51 +00:00
|
|
|
shared.rawm['owolog'] = owologger
|
|
|
|
shared.commands['owo'] = owoify
|
|
|
|
#self.help['owo'] = ['owo [num] - owoify the text', 'owo owo uwu']
|
2020-05-23 22:18:27 +00:00
|
|
|
|