Skip to main content
Deno 2 is finally here 🎉️
Learn more

banner workflow_codeql workflow_deno

Youtube Deno Discord is a Youtube Extension for a Deno-based Harmony Discord Bot

Functionalites

get detailed information about:

  • channels
  • videos

For more information on how the commands actually work and some examples, have a look at the commands page.

Usage

To use this extension it is necessary to create a .env file in the root directory of your Harmony bot. Within that file you need to include your api key from Google:

GOOGLE_API_KEY=
BOT_TOKEN=

You can also provide your Discord BOT_TOKEN, so you can just copy the given example below. Keep in mind that the extension needs permissions to read & send messages.

Example

This is a simple example how this extension can be used:

import { CommandClient, Intents } from 'https://deno.land/x/harmony@2.5.1/mod.ts'
import { YoutubeExtension } from 'https://deno.land/x/youtube_deno_discord/mod.ts'

const BOT_TOKEN = Deno.env.get("BOT_TOKEN")

const client = new CommandClient({
  prefix: '!'
})

// load the extension
client.extensions.load(YoutubeExtension)

client.on('ready', () => {
  console.log(`Ready! User: ${client.user?.tag}`)
})

client.connect(BOT_TOKEN, Intents.None)

Execute Unit Tests

Tests do run automatically with GitHub actions on push or pull request to the main branch