Modify your on_message function to include await bot.process_commands(message):
Explanation: on_message Overrides Default Command Handling:
When you define on_message, it completely replaces the bot’s default event handling for messages. This means the bot no longer processes commands unless you explicitly tell it to. await bot.process_commands(message)
This ensures that any commands (!hi in your case) are still processed after handling on_message.