不允许多个构造函数实现-只允许一个构造函数?

hyrbngr7  于 2021-09-23  发布在  Java
关注(0)|答案(0)|浏览(488)

我试图用一个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  });
    };

}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题