回答編集履歴
3
コード修正
answer
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
[v1.0への移行](https://discordpy.readthedocs.io/ja/latest/migrating.html) に、代替方法の一覧があります。
|
8
8
|
|
9
9
|
- logs_from -> [channel.history](https://discordpy.readthedocs.io/ja/latest/api.html#discord.abc.Messageable.history)
|
10
|
-
-
|
10
|
+
- delete_message -> [message.delete](https://discordpy.readthedocs.io/ja/latest/api.html#discord.Message.delete)
|
11
11
|
- [delete_messages](https://discordpy.readthedocs.io/ja/latest/api.html#discord.TextChannel.delete_messages) 複数のメッセージを削除
|
12
12
|
|
13
13
|
他、変更点
|
2
文章レイアウトの修正
answer
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
エラー内容について
|
2
2
|
> discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'logs_from'
|
3
3
|
|
4
|
-
Context に logs_from 属性がありません。
|
4
|
+
Context オブジェクトに logs_from 属性がありません。
|
5
5
|
|
6
6
|
参考にしてる情報が古いのだと思います。
|
7
|
-
[v1.0への移行](https://discordpy.readthedocs.io/ja/latest/migrating.html)
|
7
|
+
[v1.0への移行](https://discordpy.readthedocs.io/ja/latest/migrating.html) に、代替方法の一覧があります。
|
8
|
-
で、代替方法のリストがあります。
|
9
8
|
|
9
|
+
- logs_from -> [channel.history](https://discordpy.readthedocs.io/ja/latest/api.html#discord.abc.Messageable.history)
|
10
|
+
- message_delete -> [message.delete](https://discordpy.readthedocs.io/ja/latest/api.html#discord.Message.delete)
|
11
|
+
- [delete_messages](https://discordpy.readthedocs.io/ja/latest/api.html#discord.TextChannel.delete_messages) 複数のメッセージを削除
|
12
|
+
|
13
|
+
他、変更点
|
10
14
|
> 最も大きな変更点は pass_context=True が廃止され、常に Context が渡されるようになったことです。
|
11
15
|
|
12
|
-
- [channel.history](https://discordpy.readthedocs.io/ja/latest/api.html#discord.abc.Messageable.history)
|
13
|
-
-
|
16
|
+
----
|
14
|
-
- [delete_messages](https://discordpy.readthedocs.io/ja/latest/api.html#discord.TextChannel.delete_messages) 複数のメッセージを削除
|
15
17
|
|
16
18
|
```python
|
17
19
|
@bot.command()
|
1
追記:エラーについて
answer
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
+
エラー内容について
|
2
|
+
> discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'logs_from'
|
3
|
+
|
4
|
+
Context に logs_from 属性がありません。
|
5
|
+
|
1
6
|
参考にしてる情報が古いのだと思います。
|
2
7
|
[v1.0への移行](https://discordpy.readthedocs.io/ja/latest/migrating.html)
|
8
|
+
で、代替方法のリストがあります。
|
3
9
|
|
4
10
|
> 最も大きな変更点は pass_context=True が廃止され、常に Context が渡されるようになったことです。
|
5
11
|
|