@ -23,6 +23,8 @@ from utils.weather import displayweather, getweatherdata
client = commands . Bot ( command_prefix = ' -- ' , intents = Intents . all ( ) )
client = commands . Bot ( command_prefix = ' -- ' , intents = Intents . all ( ) )
logger = logging . getLogger ( __name__ )
logger = logging . getLogger ( __name__ )
stack_limit = int ( ( count_quotes ( ) * .25 ) )
with open ( QUOTE_STACK , mode = ' r ' ) as f :
with open ( QUOTE_STACK , mode = ' r ' ) as f :
quote_id_stack = json . load ( f )
quote_id_stack = json . load ( f )
@ -53,6 +55,8 @@ async def quote(bot: object, *quote: str) -> str:
" exact match! " )
" exact match! " )
return await bot . send ( f ' { ex . args } \n _What the fuck are you doing?_ ' )
return await bot . send ( f ' { ex . args } \n _What the fuck are you doing?_ ' )
else :
else :
global stack_limit
stack_limit = int ( ( count_quotes ( ) * .25 ) )
return await bot . send ( f " Done: ` { quote } \n ` ID: ` { qtid } ` " )
return await bot . send ( f " Done: ` { quote } \n ` ID: ` { qtid } ` " )
@ -168,6 +172,8 @@ async def delete_quote(bot, _id: int=None) -> str:
try :
try :
if not remove_quote ( _id ) :
if not remove_quote ( _id ) :
return await bot . send ( ' _Something wrong happened, dude!_ ' )
return await bot . send ( ' _Something wrong happened, dude!_ ' )
global stack_limit
stack_limit = int ( ( count_quotes ( ) * .25 ) )
return await bot . send ( ' _Evidence deleted, fella!_ ' )
return await bot . send ( ' _Evidence deleted, fella!_ ' )
except Exception as ex :
except Exception as ex :