File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 2
2
import json
3
3
import time
4
4
import sys
5
+ import os
5
6
6
7
import discord
7
8
from discord .utils import get
@@ -237,6 +238,21 @@ async def on_message(message):
237
238
output_text += '```'
238
239
await message .channel .send (message .author .mention + '\n ' + output_text )
239
240
241
+ if message_args [0 ] == '!error_groups' :
242
+ output_text = '```'
243
+ for error_log in os .listdir ('logs' ):
244
+ output_text += error_log + '\n '
245
+ output_text += '```'
246
+ await message .channel .send (message .author .mention + '\n ' + output_text )
247
+
248
+ if message_args [0 ] == '!errors' :
249
+ error_group = message_args [1 ]
250
+ f = open ('logs/' + error_group , 'r' )
251
+ dat = f .read ()
252
+ f .close ()
253
+ output_text = '```' + dat [- 5000 :] + '```'
254
+ await message .channel .send (message .author .mention + '\n ' + output_text )
255
+
240
256
if message_args [0 ] == '!stop_bot' :
241
257
await message .channel .send (message .author .mention + ' stopping... :(' )
242
258
sys .exit ()
Original file line number Diff line number Diff line change
1
+ this is
2
+
3
+ a placeholder
You can’t perform that action at this time.
0 commit comments