'How to make discord.py bot respond to spoiler text messages?

I was attempting to make my discord bot respond to messages even if it is spoiler marked by users. For example if a user were to send ||Hello|| I would still want my bot to respond.

Here is some relevant code

@client.listen ("on_message")
async def hello_message (message):
  if message.content.startswith ("Hello there!"):
    await message.channel.send ("Hello! it is nice to see you")

I tried doing something like this

@client.listen ("on_message")
async def hello_message (message):
  if message.content.startswith ("||Hello there!||"):
    await message.channel.send ("Hello! it is nice to see you")

But that does seem to work.

Also note that I put client.listen so that the bot could respond to other commands.

Any help would be appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source