MarByteBeep / StageLinq

NodeJS library implementation to access information through the Denon StageLinq protocol
GNU General Public License v3.0
25 stars 2 forks source link

When start the script #20

Open JohnDeereLiebhaber opened 1 year ago

JohnDeereLiebhaber commented 1 year ago

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

honusz commented 1 year ago

@djerikkux you might need typescript installed for your project.

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

JohnDeereLiebhaber commented 1 year ago

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