I'm trying to send a message if the timeout is reached for client.wait_for_message. In this case it's 30 seconds. I used TimeoutError but it doesn't throw any errors or work.
try:
msg = await client.wait_for_message(timeout= 30, author=message.author, check=check)
if msg:
await client.send_message(message.channel, "Nice job! {} solved the scramble! The word was {}!".format(message.author.mention, word))
except TimeoutError:
await client.send_message(message.channel, "Oops! Nobody solved it. The word was {}!".format(word))