首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TypeError: message.replay不是一个函数

TypeError: message.replay不是一个函数
EN

Stack Overflow用户
提问于 2022-06-05 14:35:26
回答 1查看 22关注 0票数 0
代码语言:javascript
复制
const { Client, Intents } = require('discord.js');
const { token } = require('./config.json');


const client = new Client(
    { intents: [
        Intents.FLAGS.GUILDS,
        Intents.FLAGS.GUILD_MESSAGES,
        Intents.FLAGS.GUILD_MESSAGE_REACTIONS
    ] 
    });


client.once('ready', () => {
    console.log('bot say kys!');
});

client.on('messageCreate',message => 
{
/* the error i think is here but im not realy sure the error said (TypeError: message.replay 
   enter code here`is not a function ) */
    if(message.content === 'hi')
{
    message.replay('hello')
}
});




client.login(token);

我要改写他的下一句,因为网站上说我想制造一个不和谐的机器人,这是我第一次

EN

回答 1

Stack Overflow用户

发布于 2022-06-05 18:10:46

这不是replay,而是reply

代码语言:javascript
复制
message.reply("content");
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72508213

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档