我试图用一个typescript创建一个discord bot,但一直出现以下错误:
Multiple constructor implementations are not allowed.ts(2392)
这是我的密码 client/Client.ts
:
import { Client, MessageEmbedOptions, MessageEmbed, Intents } from 'discord.js';
import consola, { Consola } from 'consola';
let botIntents = new Intents();
botIntents.add('DIRECT_MESSAGES', 'DIRECT_MESSAGE_REACTIONS', 'DIRECT_MESSAGE_TYPING', 'GUILDS', 'GUILD_BANS', 'GUILD_EMOJIS');
botIntents.add('GUILD_INTEGRATIONS', 'GUILD_INVITES', 'GUILD_MEMBERS', 'GUILD_MESSAGES', 'GUILD_MESSAGE_REACTIONS', 'GUILD_MESSAGE_TYPING');
botIntents.add('GUILD_PRESENCES', 'GUILD_VOICE_STATES', 'GUILD_WEBHOOKS');
class DJSBotClient extends Client {
public logger: Consola = consola;
/* error occurs starting here -> */ public constructor() {
super({ intents: botIntents, messageCacheLifetime: 100,messageSweepInterval: 180 });
};
}
暂无答案!
目前还没有任何答案,快来回答吧!