@typeit/discord code example
Example 1: @typeit/discord
// Use the Client that are provided by @typeit/discord NOT discord.jsimport { Client } from "@typeit/discord"; async function start() { const client = new Client({ classes: [ `${__dirname}/*Discord.ts`, // glob string to load the classes `${__dirname}/*Discord.js` // If you compile using "tsc" the file extension change to .js ], silent: false, variablesChar: ":" }); await client.login("YOUR_TOKEN");} start();
Example 2: @typeit/discord
{ "compilerOptions": { "module": "commonjs", "target": "es2017", "noImplicitAny": false, "sourceMap": true, "outDir": "build", "emitDecoratorMetadata": true, "experimentalDecorators": true, "importHelpers": true, "forceConsistentCasingInFileNames": true, "lib": [ "es2017", "esnext.asynciterable" ], "moduleResolution": "node" }, "exclude": [ "node_modules" ]}