Compare commits
2 Commits
ee1240b818
...
978d1b8231
Author | SHA1 | Date |
---|---|---|
xfnw | 978d1b8231 | |
xfnw | 2179c2770a |
5
bot.py
5
bot.py
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import asyncio, os, importlib
|
||||
import asyncio, os, importlib, inspect
|
||||
|
||||
from irctokens import build, Line
|
||||
from ircrobots import Bot as BaseBot
|
||||
|
@ -41,7 +41,8 @@ def rawm(rname):
|
|||
|
||||
|
||||
|
||||
async def message(self,modname,channel,msg):
|
||||
async def message(self,channel,msg):
|
||||
modname = os.path.splittext(os.path.basename(inspect.stack()[1].filename))[0]
|
||||
await self.send(build("PRIVMSG",[channel,f'[\x036{modname}\x0f] {msg}']))
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,6 @@ async def genOut(self, noun):
|
|||
coun += 1
|
||||
iter = 0
|
||||
while (end.find_one(word=out[-1]) is None or nouns.count(word=out[-1])-1 > iter * shared.enmul) and iter < 7:
|
||||
|
||||
try:
|
||||
out.append(random.choice(list(prew.find(pre=out[-1])))['pro'])
|
||||
except IndexError:
|
||||
|
|
|
@ -5,7 +5,7 @@ import bot
|
|||
@bot.command('test')
|
||||
@bot.is_admin
|
||||
async def testy(self,channel,nick,msg):
|
||||
await bot.message(self,'test',channel,'hi there')
|
||||
await bot.message(self,channel,'hi there')
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue