git://git.furryclan.net
/
furrycat
/
catbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02542e0
)
Account for newlines in say_many().
author
CMDR furrycat
<elite@furrycat.net>
Thu, 2 Mar 2017 10:08:15 +0000
(10:08 +0000)
committer
CMDR furrycat
<elite@furrycat.net>
Thu, 2 Mar 2017 10:10:02 +0000
(10:10 +0000)
bot.py
patch
|
blob
|
history
diff --git
a/bot.py
b/bot.py
index
70398f8
..
1db2eb9
100644
(file)
--- a/
bot.py
+++ b/
bot.py
@@
-425,6
+425,9
@@
def say_many(channel, lines, *, attachment = None, embed = None, maxlen = 2000):
n = 0
for i in range(0, len(lines)):
message_len += len(lines[i])
+ if i:
+ # Include newlines.
+ message_len += 1
if message_len > maxlen:
break
n += 1