custom_emojis = re.findall(r'<:\w*:\d*>', msg.content)
custom_emojis = [int(e.split(':')[1].replace('>', '')) for e in custom_emojis]
custom_emojis = [discord.utils.get(client.get_all_emojis(), id=e) for e in custom_emojis]
# From now, `custom_emojis` is `list` of `discord.Emoji` that `msg` contains.
copied from here https://stackoverflow.com/questions/54859876/how-check-on-message-if-message-has-emoji-for-discord-py