reading if messages have images

This commit is contained in:
klemek
2021-01-07 18:08:08 +01:00
parent 6ed8b21d76
commit 69c451d3aa
2 changed files with 25 additions and 3 deletions
+10 -1
View File
@@ -1,4 +1,5 @@
from typing import List, Dict
import os
import logging
import discord
@@ -17,6 +18,14 @@ def mention(member_id: int) -> str:
return f"<@{member_id}>"
# FILE
def is_extension(filepath: str, ext_list: List[str]) -> bool:
filename, file_extension = os.path.splitext(filepath.lower())
return file_extension in ext_list
# LISTS
@@ -67,7 +76,7 @@ def day_interval(interval: int) -> str:
def get_intro(
subject: str,
emotes: Dict[str],
emotes: Dict[str, object],
full: bool,
channels: List[discord.TextChannel],
members: List[discord.Member],