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:
|
||||
r.seed()
|
||||
bot.channels[chan] = 0
|
||||
mm = open("mastermessages.txt", "r")
|
||||
q = mm.readlines()
|
||||
sel = conf.decode_escapes(
|
||||
str(r.sample(q, 1)).strip("[]'").replace("\\n", "").strip('"')
|
||||
)
|
||||
bot.msg(f"[QUOTE] {sel}", chan)
|
||||
mm.close()
|
||||
with open("mastermessages.txt", "r") as mm:
|
||||
sel = conf.decode_escapes(
|
||||
str(r.sample(mm.readlines(), 1)).strip("[]'").replace("\\n", "").strip('"')
|
||||
)
|
||||
bot.msg(f"[QUOTE] {sel}", chan)
|
||||
return None, None
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue