Open foufrix opened 1 year ago
Discord.JS is working fine for me. Try using 'npm:discord.js'on your import
my code:
import { config } from 'https://deno.land/x/dotenv@v3.2.0/mod.ts';
import { Client, Interaction } from 'npm:discord.js';
// Setup environment variables
config({ export: true });
const bot = new Client({ // build client
intents: ['Guilds'],
});
bot // add listeneners
.once('ready', (b) => console.log(`Logged in as ${b.user.tag}`))
.on('interactionCreate', (i: Interaction) => {
if (!i.isChatInputCommand()) return;
// ignore non-command interactions
// reply cmd
i.reply('a');
});
bot.login(Deno.env.get('DISCORD_TOKEN'));
Hi @Sunf3r thank you for the reply
I have the same error using exactly your code, that's strange. (red line are only because it's a Typescript env)
What do you have running deno --version
? Are you on mac silicon as well?
Hi
I saw that there was an update to make WebSocket works better, and by that allowing the use of
discord.js
I quickly tried with a small connection example
deno-test.ts
And I have this error :
I have a Mackbook Air M1. Anyone managing to run
discord.js
on post deno v1.35? Do I need to do something else to make it work?