質問編集履歴
3
解決
title
CHANGED
File without changes
|
body
CHANGED
@@ -58,4 +58,6 @@
|
|
58
58
|
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
|
59
59
|
In channel_id: Value "join1" is not snowflake.
|
60
60
|
```
|
61
|
-
となってしまいました。
|
61
|
+
となってしまいました。
|
62
|
+
### 解決方法
|
63
|
+
ベストアンサーをご覧ください。
|
2
title
CHANGED
File without changes
|
body
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|

|
4
4
|
discordでこのような、ボタンを指定したチャンネルに表示したいです。
|
5
5
|
### 発生している問題
|
6
|
-
ボタンを指定したdiscordのチャンネルに表示したい
|
6
|
+
ボタンを指定したdiscordのチャンネルに表示したいです。
|
7
|
-
以下のコードはコマンドを打ったチャンネルに表示
|
7
|
+
以下のコードはコマンドを打ったチャンネルに表示してしまいます。
|
8
8
|
```python
|
9
9
|
buttons = ButtonsClient(bot)
|
10
10
|
@bot.command()
|
1
追加の情報
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,12 +6,13 @@
|
|
6
6
|
ボタンを指定したdiscordのチャンネルに表示したい
|
7
7
|
以下のコードはコマンドを打ったチャンネルに表示
|
8
8
|
```python
|
9
|
+
buttons = ButtonsClient(bot)
|
9
10
|
@bot.command()
|
10
11
|
async def ready(ctx):
|
11
12
|
await buttons.send(
|
12
13
|
content="test",
|
13
14
|
channel=ctx.channel.id,
|
14
|
-
|
15
|
+
components = [
|
15
16
|
ActionRow([
|
16
17
|
Button(
|
17
18
|
label="test",
|
@@ -31,7 +32,30 @@
|
|
31
32
|
```
|
32
33
|
としましたが
|
33
34
|
```エラー
|
35
|
+
Ignoring exception in command ready:
|
36
|
+
Traceback (most recent call last):
|
37
|
+
File "C:\Users\waon-pc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 85, in
|
38
|
+
wrapped
|
39
|
+
ret = await coro(*args, **kwargs)
|
40
|
+
File "f:\data\data\test\pythonfill\buttonstest.py", line 88, in ready
|
41
|
+
custom_id="join1"
|
42
|
+
File "C:\Users\waon-pc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord_buttons_plugin\__main__.py", line 61, in send
|
43
|
+
"components": retcomp
|
44
|
+
File "C:\Users\waon-pc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\http.py", line 254, in request
|
45
|
+
raise HTTPException(r, data)
|
46
|
+
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
|
47
|
+
In channel_id: Value "join1" is not snowflake.
|
48
|
+
|
49
|
+
The above exception was the direct cause of the following exception:
|
50
|
+
|
51
|
+
Traceback (most recent call last):
|
52
|
+
File "C:\Users\waon-pc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\bot.py", line 939, in
|
53
|
+
invoke
|
54
|
+
await ctx.command.invoke(ctx)
|
55
|
+
File "C:\Users\waon-pc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 863, in await injected(*ctx.args, **ctx.kwargs)
|
56
|
+
File "C:\Users\waon-pc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 94, in
|
57
|
+
raise CommandInvokeError(exc) from exc
|
34
58
|
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
|
35
|
-
In channel_id: Value "
|
59
|
+
In channel_id: Value "join1" is not snowflake.
|
36
60
|
```
|
37
61
|
となってしまいました。
|