Skip to main content

Utilize discord to store files in textchannels using bots or webhooks

Project description

CordStore

Utilize discord to store files in textchannels using bots or webhooks


Installation

# Linux/macOS
python3 -m pip install -U cordstore

# Windows
py -3 -m pip install -U cordstore

How to use

# Webhook Storage
storage = WebhookStorage("webhook_url")
uploaded_file = await storage.upload_file("example.png")
storage.close()

# Channel Storage
storage = ChannelStorage(bot, 1234567890123456789)
uploaded_file = await storage.upload_file("example.png")
storage.close()

What would a uploaded file look like?

uploaded_file.to_dict()
{
   "id":1234567890123456789,
   "channel_id":1234567890123456789,
   "filename":"example_file_name",
   "size":12345,
   "url":"example_url",
   "proxy_url":"example_proxy_url",
   "width":1280,
   "height":720,
   "content_type":"image/png"
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cordstore-0.0.3.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

cordstore-0.0.3-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page