回答編集履歴
2
最初のガード節の挙動が逆だったので修正
answer
CHANGED
@@ -50,7 +50,7 @@
|
|
50
50
|
};
|
51
51
|
|
52
52
|
client.on("message", async message => {
|
53
|
-
if (message.content.startsWith(prefix)) return;
|
53
|
+
if (!message.content.startsWith(prefix)) return;
|
54
54
|
const [command, ...args] = message.content.replace(prefix, "").split(" ");
|
55
55
|
|
56
56
|
// 上記のcommandsで定義されているキーで無ければ
|
1
channelじゃなくてcontentだった
answer
CHANGED
@@ -50,7 +50,7 @@
|
|
50
50
|
};
|
51
51
|
|
52
52
|
client.on("message", async message => {
|
53
|
-
if (message.
|
53
|
+
if (message.content.startsWith(prefix)) return;
|
54
54
|
const [command, ...args] = message.content.replace(prefix, "").split(" ");
|
55
55
|
|
56
56
|
// 上記のcommandsで定義されているキーで無ければ
|