File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ public void DoSend()
113
113
}
114
114
catch ( Exception ex )
115
115
{
116
- Console . Error . WriteLine ( $ "MessageBulker encountered error while sending message to channel { self . Channel . Id } : { ex } ") ;
116
+ Console . Error . WriteLine ( $ "MessageBulker encountered error while sending message to channel { self . Channel . Id } :\n Message: { output } \n Exception: { ex } ") ;
117
117
}
118
118
} ) ;
119
119
}
@@ -136,7 +136,16 @@ public void Send(string text)
136
136
{
137
137
lock ( Internal . Locker )
138
138
{
139
- Internal . ToSend . Enqueue ( text ) ;
139
+ if ( text . Length > 1990 )
140
+ {
141
+ Internal . ToSend . Enqueue ( text [ ..1950 ] ) ;
142
+ Send ( text [ 1950 ..] ) ;
143
+ return ;
144
+ }
145
+ else
146
+ {
147
+ Internal . ToSend . Enqueue ( text ) ;
148
+ }
140
149
if ( ! Internal . HasSendTaskActive && ( Internal . LastSentTicks <= 0 || Internal . LastSentTicks + 1500 < Environment . TickCount64 || text . Length > 1800 ) )
141
150
{
142
151
Internal . DoSend ( ) ;
You can’t perform that action at this time.
0 commit comments