回答編集履歴
1
typoを修正しました。申し訳ございません。
answer
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
[discord.Guild](https://discordpy.readthedocs.io/ja/latest/api.html#discord.Guild)オブジェクトには[
|
1
|
+
[discord.Guild](https://discordpy.readthedocs.io/ja/latest/api.html#discord.Guild)オブジェクトには[create_text_channel](https://discordpy.readthedocs.io/ja/latest/api.html#discord.Guild.create_text_channel)というコルーチン関数があります。
|
2
2
|
これの引数に作りたいテキストチャンネルの名前を渡すとカテゴリー属性のない(カテゴリーの中にない)チャンネルを作ることができます。
|
3
3
|
また、ボイスチャンネルを作るためのコルーチン関数ももちろん用意されています。
|
4
4
|
ちなみにこれらのコルーチン関数は戻り値に作ったチャンネルオブジェクトを返してくれます。
|
5
5
|
使用例:
|
6
6
|
```python
|
7
7
|
guild = client.get_guild(1234567890)
|
8
|
-
channel = await guild.
|
8
|
+
channel = await guild.create_text_channel("test-channel")
|
9
9
|
await channel.send("チャンネルを作ったよ!")
|
10
10
|
```
|