Skip to content
TWTom edited this page Jan 6, 2024 · 1 revision

dsurl

DSUrl Objects

class DSUrl()

Managing URLs for Discord attachments

from_url

@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

save_format

@property
def save_format()

the format for saving to database

url

@property
def url()

the url of the file, without expire, issue and signature

full_url

@property
def full_url()

the full url of the file

BaseExpirePolicy Objects

class BaseExpirePolicy()

is_expired

def is_expired(dsurl)

check if the url is expired, will be True if the url will expire in 10 minutes

setup

def setup(*args, **kwargs)

setup the expire policy

renew_url

def renew_url(dsurls: Iterable[DSUrl])

renew the url

DiscordFS-SFTP wiki

🏠 Home

🤝 Introduction

⚙️ API Reference

Clone this wiki locally