小编Ish*_*ain的帖子

ValidationError > s.string 需要一个字符串原语 收到:| 不明确的

我使用不和谐js为我的服务器制作一个多用途不和谐机器人,但它给了我这个错误:

ValidationError:需要一个字符串基元

昨天工作正常,但我忘记保存一些东西,我不知道保存什么。

const fs = require('node:fs');
const path = require('node:path');
const {
  Client,
  GatewayIntentBits,
  Partials,
  Collection,
} = require("discord.js");

const { Player } = require('discord-player');
const { Routes } = require('discord-api-types/v10');
const { token, prefix, guildId, clientId } = require('./config.json');
const { REST } = require('@discordjs/rest');
const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMembers,
    GatewayIntentBits.MessageContent,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.GuildPresences,
    GatewayIntentBits.GuildVoiceStates
  ],
  partials: [
    Partials.Channel,
    Partials.Message,
    Partials.User,
    Partials.GuildMember,
  ],
});

client.player = new Player(client, {
  ytdlOptions: {
    quality: "highestaudio",
    highWaterMark: 1 …
Run Code Online (Sandbox Code Playgroud)

javascript rest node.js discord discord.js

6
推荐指数
2
解决办法
1万
查看次数

标签 统计

discord ×1

discord.js ×1

javascript ×1

node.js ×1

rest ×1