-
Notifications
You must be signed in to change notification settings - Fork 1
dsurl
TWTom edited this page Jan 6, 2024
·
1 revision
class DSUrl()
Managing URLs for Discord attachments
@classmethod
def from_url(url, message_id)
Create a DSUrl object from a URL
Arguments:
-
url
str - The URL to create the DSUrl object from -
message_id
int - The message ID
Returns:
-
DSUrl
- The DSUrl object
@property
def save_format()
the format for saving to database
@property
def url()
the url of the file, without expire, issue and signature
@property
def full_url()
the full url of the file
class BaseExpirePolicy()
def is_expired(dsurl)
check if the url is expired, will be True if the url will expire in 10 minutes
def setup(*args, **kwargs)
setup the expire policy
def renew_url(dsurls: Iterable[DSUrl])
renew the url