%first/%rand/%last image
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
from typing import Union, Any
|
||||
from typing import Optional, Union, Any
|
||||
import discord
|
||||
from datetime import datetime
|
||||
|
||||
from utils import is_extension, serialize
|
||||
|
||||
IMAGE_FORMAT = [".gif", ".gifv", ".png", ".jpg", ".jpeg", ".bmp"]
|
||||
EMBED_IMAGES = ["image", "gifv", "gif"]
|
||||
EMBED_IMAGES = ["image", "gifv"]
|
||||
|
||||
|
||||
class MessageLog:
|
||||
@@ -76,6 +76,13 @@ class MessageLog:
|
||||
self.reactions[str(reaction.emoji)] = []
|
||||
async for user in reaction.users():
|
||||
self.reactions[str(reaction.emoji)] += [user.id]
|
||||
|
||||
async def fetch(self) -> Optional[discord.Message]:
|
||||
try:
|
||||
return await self.channel.channel.fetch_message(self.id)
|
||||
except (discord.NotFound, discord.Forbidden, discord.HTTPException):
|
||||
return None
|
||||
|
||||
|
||||
def dict(self) -> dict:
|
||||
return serialize(
|
||||
|
||||
Reference in New Issue
Block a user