File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 26
26
"LOG_URL" : {
27
27
"description" : " The url of the log viewer app for viewing self-hosted logs." ,
28
28
"required" : true
29
+ },
30
+ "HASTE_URL" : {
31
+ "description" : " If You Have Your Own Self Hosted Hastebin then give the link here." ,
32
+ "required" : false
29
33
}
30
34
}
31
35
}
Original file line number Diff line number Diff line change @@ -293,18 +293,21 @@ async def debug(self, ctx):
293
293
@trigger_typing
294
294
async def hastebin (self , ctx ):
295
295
"""Upload logs to hastebin."""
296
+
297
+ haste_url = os .environ .get ('HASTE_URL' , 'https://hasteb.in' )
298
+
296
299
with open (os .path .join (os .path .dirname (os .path .abspath (__file__ )),
297
300
'../temp/logs.log' ), 'r+' ) as f :
298
301
logs = f .read ().strip ()
299
302
300
303
try :
301
- async with self .bot .session .post ('https://hasteb.in /documents' ,
304
+ async with self .bot .session .post (haste_url + ' /documents' ,
302
305
data = logs ) as resp :
303
306
key = (await resp .json ())["key" ]
304
307
embed = Embed (
305
308
title = 'Debug Logs' ,
306
309
color = self .bot .main_color ,
307
- description = f'https://hasteb.in /' + key
310
+ description = f'{ haste_url } /' + key
308
311
)
309
312
except (JSONDecodeError , ClientResponseError , IndexError ):
310
313
embed = Embed (
You can’t perform that action at this time.
0 commit comments