我正在尝试创建一个命令,向使用 quick.db 存储的每个通道 id 发送消息
db.set(`channelID_${message.guıld.ıd}`, message.channel.id)
所以这就是我存储频道ID的方式有没有一种可能的方法可以向使用此存储的每个频道ID发送消息我一直在尝试但失败了
编辑:我尝试使用
const channelIDs = db.all()
.filter(e => e.ID.startsWith("channeltest"));
channelIDs.forEach(async (id) => {
try {
const channel = await client.channels.fetch(id);
channel.send('test');
}
});
获取错误 channel_id:值“[object Object]”不是雪花。