diff --git a/.gitignore b/.gitignore index f6ac0b0..7c2ae2f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff +.idea/workspace.xml .idea/**/workspace.xml .idea/**/tasks.xml .idea/**/usage.statistics.xml diff --git a/src/cogs/ytdl.py b/src/cogs/ytdl.py index 4e931fd..8d5928d 100644 --- a/src/cogs/ytdl.py +++ b/src/cogs/ytdl.py @@ -151,6 +151,7 @@ class YTDLCog(commands.Cog): try: url = message.attachments[attachment_index].url self.log.debug("Found URL %r, returning.", url) + return url except IndexError: self.log.debug("Attachment index %d is out of range (%r)", attachment_index, message.attachments) return