我刚刚看到了这篇文章:Get Message By ID: Discord.js,他们告诉他使用带有https://discord.js.org文档的msg.channel.fetchMessage(),但似乎fetchMessage()已经不存在了。 还有没有其他功能可以用来删除消息,比如msg.channel.fetchMessage(Databasemessage.id).delete() javascript discord discord.js 广告 免费试用D...
在Discord.js 中,可以通过名称获取具体的频道 ID。首先,需要获取到 Discord 服务器的所有频道列表,然后遍历这些频道,找到与给定名称匹配的频道,并获取其对应的频道 ID。 以下是一个示例代码,展示了如何通过名称获取频道 ID: 代码语言:txt 复制 const Discord = require('discord.js'); const client = new Di...
它是键值缓存。Collection.has(userid)检查该高速缓存是否有指定id的用户。UserManager.createDM(userid)...
Delete a specific message from a channel. discordClient.deleteMessageInChannel('channelId', 'messageId').then(response => { console.log('Message deleted:', response); }).catch(err => { console.error(err); }); joinGuildByInvite() Join a guild using an invite code. discordClient.joinGui...
You will need NodeJS 10.4+. If you need voice support you will also need Python 2.7 and a C++ compiler. Refer tothe Getting Started section of the docsfor more details. npm install --no-optional eris If you need voice support, remove the--no-optional. ...
Await for message from user, and when user send, will return user message as Promise. const{MessageCollector}=require("discord.js-collector");constbotMessage=awaitmessage.channel.send("Awaiting a message");constuserMessage=awaitMessageCollector.asyncQuestion({botMessage,user:message.author.id,});if...
After looking at the code (https://github.com/discordjs/discord.js/blob/main/packages/voice/src/VoiceConnection.ts), it seems that the only way for it to go back to ready state is to receive a message from discord api, that then create events that can put status back in ready state....
FABE5167F413A48CBBE1.WORKER.JS X-CONTENT-TYPE-OPTIONS:NOSNIFF /ASSETS REQUEST HEADERS 515D0236BCE3BA834026209DC78. AUTHORITY: DISCORD.COM /ASSETS :METHOD:GET 35827C42A3AF54BD169CFF0A866EB PATH://API/V9/USERS/@ME/LIBRARY?COUNTRY_CODE-US ...
const{ContextMenuCommandBuilder,ApplicationCommandType}=require('discord.js');// DISCORD_EPOCH 是个常数, 指的是 2015 年的第一毫秒,是以毫秒为单位的 UNIX 时间戳constDISCORD_EPOCH=1420070400000;module.exports={data:newContextMenuCommandBuilder()// 设置外显名称.setName('User Information')// 设置上下文...
我不知怎么弄明白了,把它修好了!