harmonyland / harmony

An easy to use Discord API Library for Deno.
https://harmony.mod.land
MIT License
311 stars 47 forks source link

[Bug] deploy.ts Uncaught ReferenceError: Cannot access 'Channel' before initialization #284

Closed deweller closed 2 years ago

deweller commented 2 years ago

What's the bug? Throws Uncaught ReferenceError: Cannot access 'Channel' before initialization when attempting to use deploy.ts

How do we reproduce it? Run this code using deno:

import * as deploy from 'https://deno.land/x/harmony@v2.4.0/deploy.ts'

console.log('Harmony - Deploy Example')

const env = Deno.env.toObject();
deploy.init({
  token: env.BOT_TOKEN,
  publicKey: env.CLIENT_ID,
})

What should have happened? Should run successfully without error

What is actually happening? Received this error message:

error: Uncaught ReferenceError: Cannot access 'Channel' before initialization
export class TextChannel extends Channel {
                                 ^
    at https://deno.land/x/harmony@v2.4.0/src/structures/textChannel.ts:26:34

What versions you're using?

Do you have anything to tell us more about the bug? Happens on denol and in the CLI