src/dorime-bot.py
async def on_message(self, message: discord.Message) -> None:
        """
        Describes how to handle messages that the bot sees

        :param discord.Message message: The incoming message
        :return None
        """

        # If the message is coming from the ignore...
        if message.author == self.user:
            return

        author: discord.User = message.author
        channel: discord.TextChannel = message.channel

        if DEBUG:
            print(
                f"channel.id ({channel.id}) == SPOTIFY_WATCHED_CHANNEL ({SPOTIFY_WATCHED_CHANNEL}): {channel.id == SPOTIFY_WATCHED_CHANNEL}"
            )

        # If the message starts with $hello, reply with Hello
        if channel.id == SPOTIFY_WATCHED_CHANNEL:
            if DEBUG:
                print("Message sent in Spotify Watch Channel")

            spotify_track_ids = re.findall(SPOTIFY_URL_REGEX, message.content)

            if DEBUG and not spotify_track_ids:
                print("No Spotify Track URL found in Message")
                return

            await message.channel.send(
                f"Found the Spotify URL with the Track id(s): {spotify_track_ids}"
            )

            # TODO: Add Track id to Spotify Playlist

        elif message.content.startswith("$hello"):
            msg = f"Hello <@{author.id}>!"
            await message.channel.send(msg)
        elif message.content.startswith("$inspire"):
            quote = get_quote()
            await message.channel.send(quote)
        elif message.content.startswith("$here"):

            print(message)

        Describes how to handle messages that the bot sees

        :param discord.Message message: The incoming message
        :return None
        
Describes how to handle messages that the bot sees
:param discord.Message message: The incoming message
:return None
Describes how to handle messages that the bot sees : param discord . Message message : The incoming message : return None
async def on_message(self, message: discord.Message) -> None:
        if message.author == self.user:
            return
        author: discord.User = message.author
        channel: discord.TextChannel = message.channel
        if DEBUG:
            print(
                f"channel.id ({channel.id}) == SPOTIFY_WATCHED_CHANNEL ({SPOTIFY_WATCHED_CHANNEL}): {channel.id == SPOTIFY_WATCHED_CHANNEL}"
            )
        if channel.id == SPOTIFY_WATCHED_CHANNEL:
            if DEBUG:
                print("Message sent in Spotify Watch Channel")
            spotify_track_ids = re.findall(SPOTIFY_URL_REGEX, message.content)
            if DEBUG and not spotify_track_ids:
                print("No Spotify Track URL found in Message")
                return
            await message.channel.send(
                f"Found the Spotify URL with the Track id(s): {spotify_track_ids}"
            )
        elif message.content.startswith("$hello"):
            msg = f"Hello <@{author.id}>!"
            await message.channel.send(msg)
        elif message.content.startswith("$inspire"):
            quote = get_quote()
            await message.channel.send(quote)
        elif message.content.startswith("$here"):
            print(message)
async def on_message ( self , message : discord . Message ) -> None : if message . author == self . user : return author : discord . User = message . author channel : discord . TextChannel = message . channel if DEBUG : print ( f"channel.id ({channel.id}) == SPOTIFY_WATCHED_CHANNEL ({SPOTIFY_WATCHED_CHANNEL}): {channel.id == SPOTIFY_WATCHED_CHANNEL}" ) if channel . id == SPOTIFY_WATCHED_CHANNEL : if DEBUG : print ( "Message sent in Spotify Watch Channel" ) spotify_track_ids = re . findall ( SPOTIFY_URL_REGEX , message . content ) if DEBUG and not spotify_track_ids : print ( "No Spotify Track URL found in Message" ) return await message . channel . send ( f"Found the Spotify URL with the Track id(s): {spotify_track_ids}" ) elif message . content . startswith ( "$hello" ) : msg = f"Hello <@{author.id}>!" await message . channel . send ( msg ) elif message . content . startswith ( "$inspire" ) : quote = get_quote ( ) await message . channel . send ( quote ) elif message . content . startswith ( "$here" ) : print ( message )
Describes how to handle messages that the bot sees
:param discord.Message message: The incoming message
:return None
Describes how to handle messages that the bot sees : param discord . Message message : The incoming message : return None
"""
        Describes how to handle messages that the bot sees

        :param discord.Message message: The incoming message
        :return None
        """ # If the message is coming from the ignore... # If the message starts with $hello, reply with Hello # TODO: Add Track id to Spotify Playlist
self
message
discord.Message