当有人向服务器添加表情符号时,机器人会将其记录下来。我试着让它的地方,但在缩略图的日志嵌入的表情符号。无论何时尝试记录,我都会收到错误消息。
[15:55:28] [UTC June:10:2021] [ERROR] (node:11176) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body embed.thumbnail.url: Scheme "undefined" is not supported. Scheme must be one of ('http', '
我的朋友最初说这是个笑话,但他告诉我要自己制造不和谐的机器人,所以几周后我才开始这么做,因为我从中发现了乐趣。因此,每当我运行此命令时,它只会给出一个错误,即它“无法读取未定义的属性获取”Bot与其他命令一起操作,这意味着它是对未来函数的扩展。另外,它是在树莓皮的基础上托管的,没有恶魔检查。
这是我的代码:
const guild = client.guilds.fetch("xxxxxxxxxxxxxx");
var memberList = [];
var randomInt = new Number(0);
var User = {
id: 0,
Foll
是否有人知道如何修复错误,因为idk,我尝试了几种方法,但都不起作用。顺便说一下,我是一个初学者。 client.on("guildMemberAdd", member => {
try {
member.send(`Hello ${member}, welcome to the PotatoHost Server!
I want to help you and so my question is: Do you want to buy a server or do you need more informations first? \n
A:
在nodejs中findIndex是未定义的
let userCart = db.get().collection(collection.CART_COLLECTION).findOne({user:objectId(userId)})
if (userCart){
let proExist=userCart.products.findIndex(product=> product.item==proId)
console.log(proExist);
}
在我的控制台上,它说
所以我的机器人不会在用户做出反应时发送消息,尽管他应该这样做,然后就会出现错误……顺便说一句,我在代码中放了很多.catch错误,因为promise rejection错误 client.on("guildMemberAdd", member => {
try {
member.send(`Hello ${member}, welcome to the PotatoHost Server!
I want to help you and so my question is: Do you want to buy a server or do yo
我有以下控制器方法:
const org = await organisation.toJSON().name;
// The next line works fine, that's not the problem
const users = await organisation.getUsers(organisation.toJSON().id, User);
await Promise.all(users.forEach(async user => {
await sendAccountEmail(
user.email,
user.surname,
我正在为我的机器人做一个赌博系统。我使用discord.js并尝试创建一个reaction收集器来选择他们想要玩的游戏。Idk为什么create a reaction收集器不是一个函数,所以可能只有我一个。
代码如下:
run(message) {
const embed = new RichEmbed()
.setColor(1)
.setTitle(`Welcome to the gambling center! Please select a game to play!`)
.addBlankField(true)
.addField(`:one:`,
我正试图纠正我的错误,但我不知道如何纠正。我已经研究过寻找节点UnhandledPromiseRejectionWarning,但是我没有能够修复它。
function getBandsInTown(artist) {
var artist = userInput;
var bandQueryURL = "https://rest.bandsintown.com/artists/" + artist + "/events?app_id=codingbootcamp"
axios.get(bandQueryURL).then(
我一直在网上寻找答案,但没有得到答案,所以我想最好在这里张贴。 我正在使用一个函数在我的discord服务器上的规则部分发送一条消息,当启动机器人时,我收到一个错误,涉及到我的rection base消息,并且无法确定发生了什么。 下面是我得到的错误: (node:1387) UnhandledPromiseRejectionWarning: TypeError [EMOJI_TYPE]: Emoji must be a string or GuildEmoji/ReactionEmoji
at Message.react (/home/runner/La-chouffe/node_
我有Discord.js自定义的表情符号错误--看起来很简单,但是如何修复呢?我想要定制的表情符号嵌入,它的工作。但是当我对定制的表情符号做出反应时,机器人不会给我任何东西。
我只从卡片上的表情符号得到答案.
Error: (node:20548) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send messages to this user
at RequestHandler.execute (d:\Users\Pc\Desktop\Musu botai\Donate\node_modules\discord.
(node:1984) UnhandledPromiseRejectionWarning: TypeError:无法读取未定义at app.use (C:\Users\niko\Desktop\test\app.js:15:24) at Layer.handle at trim_prefix Function.process_params at Function.process_params (C:\Users\niko\Desktop\test\node_modules\express\lib\router\index.js:335:12) at next (C:\Users\niko\D
未能成功调用::TypeError:无法读取未定义的self.stream.call.channel.getConnectivityState();if(self._stream) state =self.stream.call.channel.getConnectivityState();^的属性“getConnectivityState”
TypeError: Cannot read property 'getConnectivityState' of undefined
at ClientDuplexStream.<anonymous> (/opt/s
我正试着给我的机器人添加一个反应角色功能。这意味着人们加入我的服务器,必须用表情符号回复消息,才能获得适当的渠道角色。 我将机器人添加到服务器,权限=8(管理员)。 日志如下: Ready!
Emoji is ?
Try to add Role Online to User *User*
Added *User*
(node:18801) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions
at item.request.gen.end (/home/ubuntu/node_modules/di