Skip to main content

discord database

Project description

インストール

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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

discord_file_database-1.3.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file discord_file_database-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: discord_file_database-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for discord_file_database-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c842578902bb33c57f869a2d81290cfc1ba737920b6d65767fbf357906cff8fe
MD5 9534361b93dd74233a7daace9cc8fcf6
BLAKE2b-256 6ae183d6eeaafaceab69207ec2c4e00a11d5e52de2dc54acca20808020eb8166

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