Implement +bitbot.dev/mulitline-concat
to concat line to previous line
This commit is contained in:
parent
51cac7d9b5
commit
3c51348fec
1 changed files with 7 additions and 1 deletions
|
@ -31,7 +31,13 @@ class Module(ModuleManager.BaseModule):
|
||||||
messages = []
|
messages = []
|
||||||
lines = event["batch"].get_lines()
|
lines = event["batch"].get_lines()
|
||||||
for line in lines:
|
for line in lines:
|
||||||
messages.append(line.args[1])
|
message = line.args[1]
|
||||||
|
if line.has_tag("+bitbot.dev/multiline-concat"):
|
||||||
|
last_message = ""
|
||||||
|
if messages:
|
||||||
|
last_message = messages.pop(-1)
|
||||||
|
message = last_message+message
|
||||||
|
messages.append(message)
|
||||||
|
|
||||||
target = event["batch"].args[0]
|
target = event["batch"].args[0]
|
||||||
message = "\n".join(messages)
|
message = "\n".join(messages)
|
||||||
|
|
Loading…
Reference in a new issue