回答編集履歴

1

categoryを修正

2020/12/11 06:43

投稿

sevenc-nanashi
sevenc-nanashi

スコア643

test CHANGED
@@ -10,7 +10,9 @@
10
10
 
11
11
  ```python
12
12
 
13
+ thread_category = bot.get_channel(786837217041055785) # ←botはcommands.Botが入っている変数の名前に置き換えてください。
14
+
13
- await ctx.guild.create_text_channel(channel_name, category=786837217041055785)
15
+ await ctx.guild.create_text_channel(channel_name, category=thread_category)
14
16
 
15
17
  ```
16
18
 
@@ -24,7 +26,9 @@
24
26
 
25
27
  ```python
26
28
 
29
+ thread_category = bot.get_channel(786837217041055785) # ←botはcommands.Botが入っている変数の名前に置き換えてください。
30
+
27
- await ctx.guild.create_voice_channel(channel_name, category=786837217041055785)
31
+ await ctx.guild.create_voice_channel(channel_name, category=thread_category)
28
32
 
29
33
  ```
30
34
 
@@ -36,7 +40,9 @@
36
40
 
37
41
  ```python
38
42
 
43
+ thread_category = bot.get_channel(786837217041055785) # ←botはcommands.Botが入っている変数の名前に置き換えてください。
44
+
39
- new_thread = await ctx.guild.create_text_channel(channel_name, category=786837217041055785)
45
+ new_thread = await ctx.guild.create_text_channel(channel_name, category=thread_category)
40
46
 
41
47
  await new_thread.edit(topic=f"{ctx.author.id} が作成しました。")
42
48