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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file cordstore-0.0.3.tar.gz.

File metadata

  • Download URL: cordstore-0.0.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for cordstore-0.0.3.tar.gz
Algorithm Hash digest
SHA256 775a7f569ab773aaf6a4d9007a4af27040ab08ab6fe03808aa826e602004d486
MD5 e972a05e41f182f37bc145df03fc9f64
BLAKE2b-256 92c6a0ee53d1a83d2be58dc46969f7ffc4cf62385256de0ae210d578aa76fb16

See more details on using hashes here.

File details

Details for the file cordstore-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: cordstore-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for cordstore-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 131259a6f65548c47a6813974d9b7f8b5c57d32600cf58d034c87e6d49179df6
MD5 2f333c706d544ca662f75264749af7b4
BLAKE2b-256 496d47a3b80b0dec3e46fdf8cdde03ac349d732efef2822bd6835660f48fc6ab

See more details on using hashes here.

Supported by

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