質問編集履歴
3
エラーメッセージの貼り付けミス
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,9 +14,7 @@
|
|
14
14
|
|
15
15
|
```
|
16
16
|
|
17
|
-
(node:1
|
18
|
-
|
19
|
-
(node:16908) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
|
17
|
+
(node:18295) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
|
20
18
|
|
21
19
|
```
|
22
20
|
|
2
ソースコードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,11 +28,15 @@
|
|
28
28
|
|
29
29
|
```js
|
30
30
|
|
31
|
-
client.on("message", message => {
|
31
|
+
client.on("message", async message => {
|
32
32
|
|
33
33
|
if (message.content === "!del") {
|
34
34
|
|
35
|
+
const messages = await message.channel.messages.fetch({ limit: 10 })
|
36
|
+
|
35
|
-
message.channel.bulkDelete(
|
37
|
+
message.channel.bulkDelete(messages)
|
38
|
+
|
39
|
+
}
|
36
40
|
|
37
41
|
}
|
38
42
|
|
1
????マークの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Discord.jsで以下のコードが動きません。
|
6
6
|
|
7
|
-
テストのために一番シンプルにしてもどこが悪いのかわかりません
|
7
|
+
テストのために一番シンプルにしてもどこが悪いのかわかりません。
|
8
8
|
|
9
9
|
|
10
10
|
|