let msg = await;
message.channel.sendMessage('Searching... :mag_right:');
let item = args[1];
if(item == 'hi'){
msg.edit(":newspaper: Hi : Test search item")
return;
}
我试图使用等待来定义" msg"作为消息(搜索...:mag_right :)但它似乎没有工作并返回 (x是我审查个人信息)
ReferenceError: await is not defined
at Client.bot.on.message (C:\Users\x\Desktop\Tantalite wikibot\index.js:41:14)
at emitOne (events.js:96:13)
at Client.emit (events.js:191:7)
at MessageCreateHandler.handle (C:\Users\x\Desktop\Tantalite wikibot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\x\Desktop\Tantalite wikibot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:120:65)
at WebSocketManager.eventMessage (C:\Users\x\Desktop\Tantalite wikibot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:273:31)
at WebSocket.onMessage (C:\Users\x\Desktop\Tantalite wikibot\node_modules\ws\lib\WebSocket.js:442:14)
at emitTwo (events.js:106:13)
at WebSocket.emit (events.js:194:7)
at Receiver.ontext (C:\Users\x\Desktop\Tantalite wikibot\node_modules\ws\lib\WebSocket.js:841:10)