Changed how file extensions are checked.
This commit is contained in:
parent
6bc7a0c4aa
commit
151a2b4a2a
1 changed files with 3 additions and 6 deletions
|
@ -2,6 +2,7 @@ import config
|
||||||
import discord
|
import discord
|
||||||
import io
|
import io
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
import os.path
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from discord.ext.commands import Cog
|
from discord.ext.commands import Cog
|
||||||
|
|
||||||
|
@ -101,9 +102,7 @@ class Lists(Cog):
|
||||||
(
|
(
|
||||||
a
|
a
|
||||||
for a in message.attachments
|
for a in message.attachments
|
||||||
if a.filename.endswith(".png")
|
if os.path.splitext(a.filename)[1] in [".png", ".jpg", ".jpeg"]
|
||||||
or a.filename.endswith(".jpg")
|
|
||||||
or a.filename.endswith(".jpeg")
|
|
||||||
),
|
),
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
|
@ -265,9 +264,7 @@ class Lists(Cog):
|
||||||
(
|
(
|
||||||
a
|
a
|
||||||
for a in message.attachments
|
for a in message.attachments
|
||||||
if a.filename.endswith(".png")
|
if os.path.splitext(a.filename)[1] in [".png", ".jpg", ".jpeg"]
|
||||||
or a.filename.endswith(".jpg")
|
|
||||||
or a.filename.endswith(".jpeg")
|
|
||||||
),
|
),
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue