aboutsummaryrefslogtreecommitdiff
path: root/README.ja.rst
diff options
context:
space:
mode:
authorEpisword <[email protected]>2019-03-16 19:31:17 +0900
committerEpisword <[email protected]>2019-03-16 19:31:17 +0900
commit668367556a4976d95794b5059c23869ab20ddb28 (patch)
tree04c309e4b31efc473272ef73f855dfe3faf8d849 /README.ja.rst
parentTranslated some .po files. (diff)
downloaddiscord.py-668367556a4976d95794b5059c23869ab20ddb28.tar.xz
discord.py-668367556a4976d95794b5059c23869ab20ddb28.zip
Add a README.ja.rst.
Diffstat (limited to 'README.ja.rst')
-rw-r--r--README.ja.rst114
1 files changed, 114 insertions, 0 deletions
diff --git a/README.ja.rst b/README.ja.rst
new file mode 100644
index 00000000..9b9186d9
--- /dev/null
+++ b/README.ja.rst
@@ -0,0 +1,114 @@
+discord.py
+==========
+
+.. image:: https://discordapp.com/api/guilds/336642139381301249/embed.png
+ :target: https://discord.gg/r3sSKJJ
+ :alt: Discordサーバーの招待
+.. image:: https://img.shields.io/pypi/v/discord.py.svg
+ :target: https://pypi.python.org/pypi/discord.py
+ :alt: PyPIのバージョン情報
+.. image:: https://img.shields.io/pypi/pyversions/discord.py.svg
+ :target: https://pypi.python.org/pypi/discord.py
+ :alt: PyPIのサポートしているPythonのバージョン
+
+discord.py は機能豊富かつモダンで使いやすい、非同期処理にも対応したDiscord用のAPIラッパーです。
+
+主な特徴
+-------------
+
+- ``async`` と ``await`` を使ったモダンなPythonらしいAPI。
+- 適切なレート制限処理
+- Discord APIによってサポートされているものを100%カバー。
+- メモリと速度の両方を最適化。
+
+インストール
+-------------
+
+**Python 3.5.3 以降のバージョンが必須です**
+
+完全な音声サポートなしでライブラリをインストールする場合は次のコマンドを実行してください:
+
+.. code:: sh
+
+ # Linux/OS X
+ python3 -m pip install -U discord.py
+
+ # Windows
+ py -3 -m pip install -U discord.py
+
+音声サポートが必要なら、次のコマンドを実行しましょう:
+
+.. code:: sh
+
+ # Linux/OS X
+ python3 -m pip install -U discord.py[voice]
+
+ # Windows
+ py -3 -m pip install -U discord.py[voice]
+
+
+開発版をインストールしたいのならば、次の手順に従ってください:
+
+.. code:: sh
+
+ $ git clone https://github.com/Rapptz/discord.py
+ $ cd discord.py
+ $ python3 -m pip install -U .[voice]
+
+
+オプションパッケージ
+~~~~~~~~~~~~~~~~~~~~~~
+
+* PyNaCl (音声サポート用)
+
+Linuxで音声サポートを導入するには、前述のコマンドを実行する前にお気に入りのパッケージマネージャー(例えば ``apt`` や ``yum`` など)を使って以下のパッケージをインストールする必要があります:
+
+* libffi-dev (システムによっては ``libffi-devel``)
+* python-dev (例えばPython 3.6用の ``python3.6-dev``)
+
+簡単な例
+--------------
+
+.. code:: py
+
+ import discord
+
+ class MyClient(discord.Client):
+ async def on_ready(self):
+ print('Logged on as', self.user)
+
+ async def on_message(self, message):
+ # don't respond to ourselves
+ if message.author == self.user:
+ return
+
+ if message.content == 'ping':
+ await message.channel.send('pong')
+
+ client = MyClient()
+ client.run('token')
+
+Botの例
+~~~~~~~~~~~~~
+
+.. code:: py
+
+ import discord
+ from discord.ext import commands
+
+ bot = commands.Bot(command_prefix='>')
+
+ @bot.command()
+ async def ping(ctx):
+ await ctx.send('pong')
+
+ bot.run('token')
+
+examplesディレクトリに更に多くのサンプルがあります。
+
+リンク
+------
+
+- `ドキュメント <https://discordpy.readthedocs.io/ja/latest/index.html>`_
+- `公式Discordサーバー <https://discord.gg/nXzj3dg>`_
+- `Discord API <https://discord.gg/discord-api>`_ \ No newline at end of file