Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.login does not work in Deno #9278

Closed
aidantomcy opened this issue Mar 26, 2023 · 1 comment
Closed

client.login does not work in Deno #9278

aidantomcy opened this issue Mar 26, 2023 · 1 comment

Comments

@aidantomcy
Copy link

Which package is this bug report for?

discord.js

Issue description

Ever since Deno 1.28 has been released, npm compatibility is stable, and you can use npm packages with a npm specifier.

However, when I tried to run a basic discord app in Deno, client.login does not work, and no error is thrown.
I thought it might be a problem with the Deno dotenv package, but it doesn't work even when I hard-coded the token directly in a string for testing purposes. I've also tried running this in a sandboxed environment, however it still does not work.

I've tried running this program with node, and it works perfectly fine.

Deno version: 1.32.1

Code sample

import "https://deno.land/x/dotenv/load.ts";
import { Client, GatewayIntentBits } from "npm:discord.js";

const client = new Client({
  intents: [GatewayIntentBits.Guilds]
});

client.on("ready", () => console.log(`${client.user.tag} is now online`));
client.on("messageCreate", async (message) => console.log(message));

client.login(Deno.env.get("BOT_TOKEN")); // This does not run

Package version

14.8.0

Node.js version

N/A

Operating system

Ubuntu 22.04 (WSL)

Priority this issue should have

Medium (should be fixed soon)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

Guilds

I have tested this issue on a development release

No response

@Jiralite
Copy link
Member

We do not support this environment.

@Jiralite Jiralite closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants