https://github.com/codemeapixel/virulent
A powerful JavaScript Library for the Discord API.
https://github.com/codemeapixel/virulent
Last synced: 8 months ago
JSON representation
A powerful JavaScript Library for the Discord API.
- Host: GitHub
- URL: https://github.com/codemeapixel/virulent
- Owner: CodeMeAPixel
- License: apache-2.0
- Created: 2020-04-20T09:25:35.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-24T19:55:27.000Z (almost 5 years ago)
- Last Synced: 2025-06-30T10:50:24.540Z (8 months ago)
- Language: JavaScript
- Homepage: http://docs.virulentjs.site/
- Size: 2.43 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkdn
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

[](https://github.com/TheRealToxicDev/Virulent)
[](https://nodejs.org/en/)
[](https://github.com/TheRealToxicDev/Virulent)
Virulent is a powerful node.js module that allows you to interact with the Discord API. Unlike other JavaScript Discord libraries Virulent takes a object-oriented yet slightly more sophisticated approach making your bot's code significantly tidier and easier to comprehend.
## Installation
Install Virulent using [`github`](https://www.github.com):
```bash
npm i --save github:TheRealToxicDev/Virulent
```
Aditionally you can Install the Virulent Module via your Package.json
by adding the following line under your List of Dependencies.
```bash
"virulent": "https://github.com/TheRealToxicDev/Virulent"
```
Example Package.json
```bash
{
"name": "virulent",
"version": "1.0.0",
"description": "Official Sample Bot for the Virulent Discord Library.",
"main": "bot.js",
"scripts": {
"start": "node bot.js"
},
"engines": {
"node": "12.16.2"
},
"keywords": [
"discord",
"api",
"client",
"javascript"
],
"author": "Toxic Dev",
"license": "Apache-2.0",
"dependencies": {
"virulent": "https://github.com/TheRealToxicDev/Virulent"
}
}
```
Or [`npm`](https://www.npmjs.com/):
```bash
Coming Soon (Nowhere near ready for that)
```
## Usage
Import the required components. For example the Virulent Module requirement looks like this:
```jsx harmony
const Discord = require ('virulent');
```
Then use it in your bots ``index.js`` as a string or callback.
```jsx harmony
'use strict';
const Discord = require('virulent');
const client = new Discord.Client();
// Insert Ready or Message event Here.
client.login(''); // put your bot token here
```
Usage Ping Example
```jsx harmony
'use strict';
const Discord = require('virulent');
const client = new Discord.Client();
client.on('ready', async (client) => {
const self = await client.getSelf();
console.log(`${self.username}#${self.discriminator} is online !`);
await client.setPresence({ game: { name: 'Hello, World!' } });
});
client.on('message', (message) => {
if (message.content.startsWith('!ping')) {
client.sendMessage(message.channel_id, {
content: 'Pong!'
}).catch(console.error);
}
});
client.login(''); // put your bot token here
```
# Support
If you need help you can join the [Virulent Support Server](https://discord.gg/aKqSx9G)
Or check out our [Documentation](https://virulentjs.site)