git subrepo pull wrapper

subrepo:
  subdir:   "wrapper"
  merged:   "0cf920f"
upstream:
  origin:   "git@github.com:benji7425/shell-discord-bot.git"
  branch:   "master"
  commit:   "0cf920f"
git-subrepo:
  version:  "0.3.1"
  origin:   "???"
  commit:   "???"
This commit is contained in:
benji7425 2017-05-21 02:41:53 +01:00
parent ff17bd8b68
commit 9430f4f0db
13 changed files with 77 additions and 20 deletions

8
wrapper/.gitignore vendored
View File

@ -2,8 +2,6 @@
token.json
# Created by https://www.gitignore.io/api/node
### Node ###
# Logs
logs
@ -35,6 +33,7 @@ coverage
build/Release
# Dependency directories
node_cache
node_modules
jspm_packages
@ -52,8 +51,3 @@ jspm_packages
# Yarn Integrity file
.yarn-integrity
# End of https://www.gitignore.io/api/node
# Project-specific cache for use with shrinkpack - https://github.com/JamieMason/shrinkpack

View File

@ -6,6 +6,6 @@
[subrepo]
remote = git@github.com:benji7425/shell-discord-bot.git
branch = master
commit = 59528679ea56f0a82b4564fe19b57229925f2e5a
parent = 56afc197bc59785baf2fa97bd6b6220cd238cceb
commit = 0cf920f3a659f11d388a62b248073c08bf89949b
parent = 8fc554c68d7f249ca5c7307e78d81866cb130e74
cmdver = 0.3.1

View File

@ -1,3 +1,3 @@
save=true
sace-exact=true
save-exact=true
cache=node_cache

View File

@ -2,13 +2,21 @@
The purpose of this is to act as a shell for other bot modules, so that a single bot user account can be used for a multi-function bot.
## Setup
- Clone this as a submodule/subtree/subrepo into another repo as "wrapper" (or a folder name of your choice)
- Use *app/index.js* as your bot entry point, or change the reference in this index.js
- `npm install --save discord.io`
- `npm shrinkwrap --dev`
- `shrinkpack .`
## Usage
### As a project base
- Fork/clone/merge this repo into a new one
- Run `npm init` to re-initialise as the new repo
- Run `npm install`
- Create *token.json* with your discord token: `{ "token": "1234567890" }`
- Add your modules and reference them in `var BotModules = [];`
for example: `var BotModules = [require("my-module")];`
### As a wrapper
- Use [git subrepo](https://github.com/ingydotnet/git-subrepo) to clone this into a folder called *wrapper* in your parent project
- Update your parent project's `start` script to run `node wrapper/index.js`
- Add a reference to your parent project's main file in `var BotModules = [];`
for example: `var BotModules = [require("../app/index.js")];`
## Creating a bot module

View File

@ -4,7 +4,7 @@ const Console = require("console");
//external module imports
var Discord = require("discord.io");
var BotModules = [require("../app/index.js")];
var BotModules = [];
var bot;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,36 @@
{
"name": "node-boilerplate",
"version": "1.0.0"
"name": "discord-bot",
"version": "1.0.0",
"dependencies": {
"cjopus": {
"version": "0.0.4",
"from": "cjopus@>=0.0.4 <0.0.5",
"resolved": "./node_shrinkwrap/cjopus-0.0.4.tar"
},
"discord.io": {
"version": "2.5.1",
"from": "discord.io@latest",
"resolved": "./node_shrinkwrap/discord.io-2.5.1.tar"
},
"options": {
"version": "0.0.6",
"from": "options@>=0.0.5",
"resolved": "./node_shrinkwrap/options-0.0.6.tar"
},
"tweetnacl": {
"version": "0.14.5",
"from": "tweetnacl@>=0.14.0 <0.15.0",
"resolved": "./node_shrinkwrap/tweetnacl-0.14.5.tar"
},
"ultron": {
"version": "1.0.2",
"from": "ultron@>=1.0.0 <1.1.0",
"resolved": "./node_shrinkwrap/ultron-1.0.2.tar"
},
"ws": {
"version": "1.1.4",
"from": "ws@>=1.1.0 <2.0.0",
"resolved": "./node_shrinkwrap/ws-1.1.4.tar"
}
}
}

23
wrapper/package.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "discord-bot",
"version": "1.0.0",
"description": "The purpose of this is to act as a shell for other bot modules, so that a single bot user account can be used for a multi-function bot.",
"main": "index.js",
"dependencies": {
"discord.io": "2.5.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/benji7425/discord-bot-wrapper.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/benji7425/discord-bot-wrapper/issues"
},
"homepage": "https://github.com/benji7425/discord-bot-wrapper#readme"
}