This repository has been archived by the owner on Dec 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from pyraxo/rewrite
Rewrite, as an npm package
- Loading branch information
Showing
83 changed files
with
3,759 additions
and
2,612 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,11 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git | ||
node_modules | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Configuration | ||
resources/config | ||
.env | ||
|
||
# Databases / Storage | ||
resources/i18n | ||
resources/scripts | ||
resources/images | ||
.cache | ||
|
||
src/modules | ||
src/commands | ||
src/models | ||
test/auth.json | ||
|
||
# Documentation | ||
docs | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
node_modules | ||
.npm | ||
|
||
test/auth.json | ||
|
||
assets | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,51 @@ | ||
<div align="center"> | ||
<h1> | ||
<br> | ||
iris | ||
<br> | ||
</h1> | ||
<h4>The better Discord bot base</h4> | ||
<p> | ||
<a href="https://github.com/feross/standard"><img src="https://cdn.rawgit.com/feross/standard/master/badge.svg"></a> | ||
<br> | ||
<a href="http://forthebadge.com/"><img src="http://forthebadge.com/images/badges/built-with-love.svg" alt="Built with ❤"></a> | ||
<br> | ||
<a href="https://discord.gg/bBqpAKw"><img src="https://discordapp.com/api/guilds/247727924889911297/embed.png" alt="Studio 777"></a> | ||
</p> | ||
</div> | ||
|
||
### Used by | ||
* [Tatsumaki](https://tatsumaki.xyz), a multi-purpose social Discord bot | ||
* [haru](https://pyraxo.moe/haru), everyone's favourite idol and part-time bot | ||
|
||
**iris** is an advanced, efficient and highly customisable base for Discord command bots written in Node.js | ||
# Sylphy | ||
<img src="https://discordapp.com/api/guilds/247727924889911297/embed.png" alt="Studio 777"></a> [![npm](https://img.shields.io/npm/v/sylphy.svg)](https://www.npmjs.com/package/sylphy) | ||
|
||
<a href="https://nodei.co/npm/sylphy/"><img src="https://nodei.co/npm/sylphy.png?downloads=true&stars=true" alt="NPM info" /></a> | ||
|
||
**Sylphy** is an advanced, efficient and highly customisable framework for Discord command bots written in Node.js | ||
|
||
## Getting Started | ||
### Requirements | ||
* Redis | ||
* Rethinkdb | ||
* **Node.js 7+** | ||
* **Node.js 6+** | ||
|
||
A firm grasp of **ES6 + async/await** syntax is optional but recommended. | ||
|
||
A firm grasp of **ES6 + async/await** syntax is recommended. | ||
As the bot framework extends the [Eris](https://github.com/abalabahaha/Eris) client, please refer to the docs [here](https://abal.moe/Eris/docs). | ||
|
||
### Installation | ||
### Usage | ||
```bash | ||
$ git clone https://github.com/pyraxo/iris | ||
$ cd iris | ||
$ npm i | ||
$ npm start | ||
$ npm install --save sylphy | ||
``` | ||
|
||
### Configuration | ||
Create a new `.env` file from `.env.example` and edit the values as desired. Follow `.env` instructions [here](https://www.npmjs.com/package/dotenv-safe) | ||
If you don't want to use any built-in plugins, you may run the above command with the `--no-optional` flag. | ||
|
||
#### Example | ||
```js | ||
const Bot = require('sylphy') | ||
|
||
const client = new Bot({ | ||
token: 'your token here', | ||
modules: 'path/to/modules' | ||
}) | ||
|
||
client.register('commands', 'path/to/commands') | ||
|
||
client.run() | ||
``` | ||
|
||
### Documentation | ||
To view the API, please visit the [wiki](https://github.com/pyraxo/sylphy/wiki). | ||
|
||
## License | ||
Copyright (C) 2017 Pyraxo | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published | ||
by the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
As the bot base uses the [Eris](https://github.com/abalabahaha/Eris) library, please refer to the docs [here](https://abal.moe/ErisDev/docs.html). | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,14 @@ | ||
const gulp = require('gulp') | ||
const babel = require('gulp-babel') | ||
const standard = require('gulp-standard') | ||
|
||
const paths = ['src/**/*.js'] | ||
|
||
gulp.task('default', ['build']) | ||
|
||
gulp.task('watch', ['build'], () => { | ||
gulp.watch(paths, ['build']) | ||
}) | ||
|
||
gulp.task('build', ['babel']) | ||
|
||
gulp.task('lint', () => { | ||
gulp.src(paths) | ||
.pipe(standard()) | ||
.pipe(standard.reporter('default', { | ||
breakOnError: true, | ||
quiet: true | ||
})) | ||
}) | ||
gulp.task('default', ['babel']) | ||
|
||
gulp.task('babel', () => { | ||
gulp.src(paths) | ||
.pipe(babel()) | ||
.pipe(babel({ | ||
plugins: ['transform-async-to-generator'] | ||
})) | ||
.pipe(gulp.dest('build')) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,46 @@ | ||
{ | ||
"name": "iris", | ||
"version": "2.2.0", | ||
"private": true, | ||
"description": "The better Discord bot base", | ||
"main": "index.js", | ||
"name": "sylphy", | ||
"version": "0.1.0", | ||
"description": "The better Discord bot framework", | ||
"main": "build/index.js", | ||
"scripts": { | ||
"start": "node --harmony_async_await index.js", | ||
"lint": "standard --fix", | ||
"gendocs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose" | ||
"docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose", | ||
"pub": "gulp && npm publish", | ||
"install": "gulp", | ||
"test": "gulp && node test/bot.js" | ||
}, | ||
"engines": { | ||
"node": ">=7.0.0" | ||
"node": ">=6.0.0" | ||
}, | ||
"repository": { | ||
"url": "git+https://github.com/pyraxo/sylphy.git", | ||
"type": "git" | ||
}, | ||
"keywords": [ | ||
"Discord", | ||
"Chat", | ||
"Bot", | ||
"Commands", | ||
"Base" | ||
"discord", | ||
"bot", | ||
"framework", | ||
"eris", | ||
"core", | ||
"base", | ||
"es6", | ||
"plugins", | ||
"commands", | ||
"modules", | ||
"middleware", | ||
"chat" | ||
], | ||
"author": "pyraxo <[email protected]> (https://pyraxo.moe)", | ||
"license": "AGPL-3.0", | ||
"dependencies": { | ||
"bluebird": "^3.4.6", | ||
"chalk": "^1.1.3", | ||
"dotenv-safe": "^2.3.2", | ||
"eris": "github:abalabahaha/eris#dev", | ||
"eventemitter3": "^2.0.1", | ||
"longjohn": "^0.2.11", | ||
"moment": "^2.13.0", | ||
"moment-timezone": "^0.5.5", | ||
"node-opus": "^0.2.4", | ||
"redis": "^2.6.1", | ||
"require-all": "^2.0.0", | ||
"superagent": "^2.2.0", | ||
"superagent-xml2jsparser": "^0.1.1", | ||
"thinky": "^2.3.7", | ||
"winston": "^2.2.0", | ||
"winston-cluster": "0.0.4", | ||
"winston-daily-rotate-file": "^1.3.1" | ||
"eris": "github:abalabahaha/eris#dev" | ||
}, | ||
"devDependencies": { | ||
"jsdoc": "^3.4.0", | ||
"minami": "^1.1.1", | ||
"standard": "^8.1.0" | ||
"babel-plugin-transform-async-to-generator": "^6.16.0", | ||
"docdash": "^0.4.0", | ||
"gulp": "^3.9.1", | ||
"gulp-babel": "^6.1.2", | ||
"jsdoc": "^3.4.3", | ||
"jsdoc-strip-async-await": "^0.1.0" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.