StageLinq icon indicating copy to clipboard operation
StageLinq copied to clipboard

When start the script

Open JohnDeereLiebhaber opened this issue 3 years ago • 2 comments

Here is my error message: node --experimental-loader ts-node/esm ./index.ts (node:15452) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time (Use node --trace-warnings ... to show where the warning was created) C:\Users\zrina\Documents\allebots\partybrobot\denon\node_modules\ts-node\dist-raw\node-internal-modules-esm-get_format.js:93 throw new ERR_UNKNOWN_FILE_EXTENSION(ext, fileURLToPath(url)); ^ CustomError: ERR_UNKNOWN_FILE_EXTENSION .ts C:\Users\zrina\Documents\allebots\partybrobot\denon\node_modules\stagelinq\index.ts and below is the code for it

`import { Client, ClientOptions, GatewayIntentBits} from "discord.js"; import { StageLinq } from "stagelinq";

const token = "My Token"; const options = { downloadDbSources: true }; const stageLinq = new StageLinq({downloadDbSources: true});

console.log("Bot is starting...");

const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages] }); client.login(token);

client.on("ready", () => { console.log("Bot ist Online !!!"); });

client.on("messageCreate", message => { if (message.author.bot) return;

if(message.content.startsWith("!hallo")) {
    message.channel.send("hallo");
};

});`

Thanks in advance

JohnDeereLiebhaber avatar Oct 04 '22 17:10 JohnDeereLiebhaber

@djerikkux you might need typescript installed for your project.

Did you install the module from NPM or just pull the git into your project?

honusz avatar Oct 04 '22 23:10 honusz

@honusz I only installed the module from NPM. So I may need to install typescript for this project?

JohnDeereLiebhaber avatar Oct 05 '22 12:10 JohnDeereLiebhaber