# DISCORD.HY

### Welcome to Discord.hy, the most **modern** discord bot making library, developed by Hydrogen Studio.

<br>

<a href="https://nodei.co/npm/discord.hy/"><img src="https://nodei.co/npm/discord.hy.png"></a>
<br>

# Table of Content
<a href="#">Discord.hy</a><br>
<a href="#info">Info</a><br>
<a href="#about">About</a><br>
<a href="#table-of-content">Table of Content</a><br>
<a href="#install">Install</a><br>
<a href="#basic-bot-example">Basic Bot Example</a><br>

## Info

Requires node.js version 12.0.0 or above

Documentation: [https://discordhy.js.org](https://discordhy.js.org)


Discord: [support server](https://discord.gg/SNNS24r)

## Stats
<br>
<img alt="npm" src="https://img.shields.io/npm/v/discord.hy">
<img alt="npm bundle size" src="https://img.shields.io/bundlephobia/minzip/discord.hy?label=discord.hy%20file%20size&style=plastic">
<img alt="NPM" src="https://img.shields.io/npm/l/discord.hy">
<a href='https://discordhy.js.org/en/latest/?badge=latest'>
    <img src='https://readthedocs.org/projects/dhy/badge/?version=latest' alt='Documentation Status' title="documentation build status"/>
</a>

## About

Discord.hy is a modern discord custom bot making library. We currently only support sending messages, but more are coming everyday!

We have reached 100% coverage!

# Plugins

## To use plugins, you must install discord.hy globally for the CLI commands to work.

What is unique about discord.hy is that it allows plugins to be installed. Down below is a list of current available plugins.

1. [Dsn.js api](https://npmjs.com/package/dsn.js) - post your bot's status to discordservices.net - install using `discord` CLI command

2. [express](https://expressjs.com/) - host your own website using this plugin  - install using `discord` CLI command


## Install

```npm i -g discord.hy```

## Basic Bot Example

```js
let Discord = require("discord.hy")// import library | npm i discord.hy
let client = new Discord.Client({ websocketstat: true });//set up client with options
 
 
client.on("message", function(msg){//call in the 'message' event
    if(msg.content.startsWith("!ping")){//check the message content for !ping
        let Embed = new Discord.RichEmbed()
           .setTitle("Ping Command Response")
           .addField("Ping", "Pong", true)
           .addField("Ping", "Pong")//inline default to false
           .setTimestamp()
           .setColor("RANDOM");
        msg.channel.send(Embed)//send Embed response
    }
})
 
 
client.on("ready", function(){//call in the 'ready' event
    console.log("Bot online!")//log the ready data in the console
})
 
 
 
let login = client.login("super secret bot token")
```

WE HAVE BEATEN 100% api coverage! We created this package like discord.js so that discord.js developers can migrate their bot from discord.js to discord.hy faster, with only a few thing to change.

Documentation Still in Progress.
