Skip to main content

インストール

pip install -U discord-file-database  

データベースの作成

この関数はデータベースを作成する一度のみ使用

await create_db(client, channel_id, file_type)  

client - commands.Bot / discord.Client
channel_id - discord.TextChannel.id データベースとするチャンネルのID
file_type - str / int / float / dict / list 保存したい型

実行結果:

>>>     <message id>  

この数値はconnect関数を使用する際に必要です

データベースに接続

await connect(bot, channel_id, message_id)  

返り値を必ず受け取ってください。
この説明では返り値をconnで表しています。

bot - commands.Bot / discord.Client
channel_id - discord.TextChannel.id データベースとするチャンネルのID
message_id - discord.Message.id create_db関数で取得した数値

内容を取得

await conn.content()  

内容を編集

await conn.edit(after_content)  

after_content - file_type 編集後の内容

データベースを削除

await conn.remove_db()  

Release files for discord-file-database 1.3.0

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

Built distribution (wheel)

Table of built distributions (wheels) for discord-file-database 1.3.0
File Interpreter ABI Platform
discord_file_database-1.3.0-py3-none-any.whl Python 3 none any Details

Release files / discord_file_database-1.3.0-py3-none-any.whl

Download URL discord_file_database-1.3.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c842578902bb33c57f869a2d81290cfc1ba737920b6d65767fbf357906cff8fe
BLAKE2b-256 checksum
How to use checksums
6ae183d6eeaafaceab69207ec2c4e00a11d5e52de2dc54acca20808020eb8166
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

Release history Release notifications | RSS feed

This release

1.3.0 This release

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

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