Skip to main content

interactions-files

PyPI - Downloads Version Python Requirement

An extension library for interactions.py allowing files in interaction responses.

Table of Contents

Installation

pip install -U interactions-files

Information

This is interactions-files, an extension library for interactions.py allowing files in interaction responses.

By default, interactions.py does not allow you to send files in CommandContext and ComponentContext. This extension exists to solve that problem by adding files field to the .send() and .edit().

Quickstart

You can load interactions-files like every other Extension by using:

client.load('interactions.ext.files')

After that, you can start sending files in Context. For example of doing this, go to this.

Alternatively, you can use the functions provided by the Extension. Take a look at an example below:

import io
import interactions
from interactions.ext.files import command_send

client = interactions.Client(token="Pfft!")

@client.command(
    name="file",
    description="Send a file.",
)
async def _test(ctx: interactions.CommandContext):
    txt = io.StringIO("This is a text file.")
    file = interactions.File(filename="file.txt", fp=txt)
    await command_send(ctx, "Below is a file.", files=file)

client.start()

For more information on the fuctions, check out the documentation.

Documentation

API Reference

Release files for interactions-files 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for interactions-files 1.1.5
File Size Uploaded
interactions-files-1.1.5.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for interactions-files 1.1.5
File Interpreter ABI Platform
interactions_files-1.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / interactions-files-1.1.5.tar.gz

Download URL interactions-files-1.1.5.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
826d58b1087d5b56f571bb450b6102a707a3b39dd4ca277e60f860a1eea25562
BLAKE2b-256 checksum
How to use checksums
770efe5207fb0e79c821f750de3de5e237f0946684e681a9a92a5bcc65601fa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release files / interactions_files-1.1.5-py3-none-any.whl

Download URL interactions_files-1.1.5-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1665247031c50db4504f3f654efaba1751f1d6311c1e3267e894e51403cad0a5
BLAKE2b-256 checksum
How to use checksums
7bb2075e32caf933c171f4d169d67d38fc32178f6102a916f63b0ed65f2a5039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release history Release notifications | RSS feed

This release

1.1.5 This release

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page