forked from Firepup650/FireBot
Simplify rework
This commit is contained in:
parent
058a97eaf7
commit
478bcb9d04
1 changed files with 5 additions and 7 deletions
12
handlers.py
12
handlers.py
|
@ -136,13 +136,11 @@ def PRIVMSG(bot: bare.bot, msg: str) -> Union[tuple[None, None], tuple[str, str]
|
||||||
if chan in bot.channels and bot.channels[chan] >= bot.interval:
|
if chan in bot.channels and bot.channels[chan] >= bot.interval:
|
||||||
r.seed()
|
r.seed()
|
||||||
bot.channels[chan] = 0
|
bot.channels[chan] = 0
|
||||||
mm = open("mastermessages.txt", "r")
|
with open("mastermessages.txt", "r") as mm:
|
||||||
q = mm.readlines()
|
sel = conf.decode_escapes(
|
||||||
sel = conf.decode_escapes(
|
str(r.sample(mm.readlines(), 1)).strip("[]'").replace("\\n", "").strip('"')
|
||||||
str(r.sample(q, 1)).strip("[]'").replace("\\n", "").strip('"')
|
)
|
||||||
)
|
bot.msg(f"[QUOTE] {sel}", chan)
|
||||||
bot.msg(f"[QUOTE] {sel}", chan)
|
|
||||||
mm.close()
|
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue