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 2626 "LOG_URL" : {
2727 "description" : " The url of the log viewer app for viewing self-hosted logs." ,
2828 "required" : true
29+ },
30+ "HASTE_URL" : {
31+ "description" : " If You Have Your Own Self Hosted Hastebin then give the link here." ,
32+ "required" : false
2933 }
3034 }
3135}
Original file line number Diff line number Diff line change @@ -293,18 +293,21 @@ async def debug(self, ctx):
293293 @trigger_typing
294294 async def hastebin (self , ctx ):
295295 """Upload logs to hastebin."""
296+
297+ haste_url = os .environ .get ('HASTE_URL' , 'https://hasteb.in' )
298+
296299 with open (os .path .join (os .path .dirname (os .path .abspath (__file__ )),
297300 '../temp/logs.log' ), 'r+' ) as f :
298301 logs = f .read ().strip ()
299302
300303 try :
301- async with self .bot .session .post ('https://hasteb.in /documents' ,
304+ async with self .bot .session .post (haste_url + ' /documents' ,
302305 data = logs ) as resp :
303306 key = (await resp .json ())["key" ]
304307 embed = Embed (
305308 title = 'Debug Logs' ,
306309 color = self .bot .main_color ,
307- description = f'https://hasteb.in /' + key
310+ description = f'{ haste_url } /' + key
308311 )
309312 except (JSONDecodeError , ClientResponseError , IndexError ):
310313 embed = Embed (
You can’t perform that action at this time.
0 commit comments