kopia lustrzana https://github.com/mkdryden/telegram-stats-bot
				
				
				
			Documentation and cleanup
							rodzic
							
								
									ab51722ebc
								
							
						
					
					
						commit
						cf9b85a363
					
				| 
						 | 
				
			
			@ -173,7 +173,14 @@ def print_stats(update: Update, context: CallbackContext):
 | 
			
		|||
        context.bot.send_photo(chat_id=update.effective_chat.id, photo=image)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def send_help(text, context, update):
 | 
			
		||||
def send_help(text: str, context: CallbackContext, update: Update):
 | 
			
		||||
    """
 | 
			
		||||
    Send help text to user. Tries to send a direct message if possible.
 | 
			
		||||
    :param text: text to send
 | 
			
		||||
    :param context:
 | 
			
		||||
    :param update:
 | 
			
		||||
    :return:
 | 
			
		||||
    """
 | 
			
		||||
    try:
 | 
			
		||||
        context.bot.send_message(chat_id=update.effective_user.id,
 | 
			
		||||
                                 text=f"```\n{text}\n```",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -139,7 +139,6 @@ class StatsRunner(object):
 | 
			
		|||
        :param n: Number of users to show
 | 
			
		||||
        :param start: Start timestamp (e.g. 2019, 2019-01, 2019-01-01, "2019-01-01 14:21")
 | 
			
		||||
        :param end: End timestamp (e.g. 2019, 2019-01, 2019-01-01, "2019-01-01 14:21")
 | 
			
		||||
        :return:
 | 
			
		||||
        """
 | 
			
		||||
        date_query = None
 | 
			
		||||
        sql_dict = {}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue