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:
parent
ff17bd8b68
commit
9430f4f0db
8
wrapper/.gitignore
vendored
8
wrapper/.gitignore
vendored
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
token.json
|
token.json
|
||||||
|
|
||||||
# Created by https://www.gitignore.io/api/node
|
|
||||||
|
|
||||||
### Node ###
|
### Node ###
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
|
@ -35,6 +33,7 @@ coverage
|
||||||
build/Release
|
build/Release
|
||||||
|
|
||||||
# Dependency directories
|
# Dependency directories
|
||||||
|
node_cache
|
||||||
node_modules
|
node_modules
|
||||||
jspm_packages
|
jspm_packages
|
||||||
|
|
||||||
|
@ -52,8 +51,3 @@ jspm_packages
|
||||||
|
|
||||||
# Yarn Integrity file
|
# Yarn Integrity file
|
||||||
.yarn-integrity
|
.yarn-integrity
|
||||||
|
|
||||||
|
|
||||||
# End of https://www.gitignore.io/api/node
|
|
||||||
|
|
||||||
# Project-specific cache for use with shrinkpack - https://github.com/JamieMason/shrinkpack
|
|
|
@ -6,6 +6,6 @@
|
||||||
[subrepo]
|
[subrepo]
|
||||||
remote = git@github.com:benji7425/shell-discord-bot.git
|
remote = git@github.com:benji7425/shell-discord-bot.git
|
||||||
branch = master
|
branch = master
|
||||||
commit = 59528679ea56f0a82b4564fe19b57229925f2e5a
|
commit = 0cf920f3a659f11d388a62b248073c08bf89949b
|
||||||
parent = 56afc197bc59785baf2fa97bd6b6220cd238cceb
|
parent = 8fc554c68d7f249ca5c7307e78d81866cb130e74
|
||||||
cmdver = 0.3.1
|
cmdver = 0.3.1
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
save=true
|
save=true
|
||||||
sace-exact=true
|
save-exact=true
|
||||||
cache=node_cache
|
cache=node_cache
|
||||||
|
|
|
@ -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.
|
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
|
## Usage
|
||||||
- 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
|
### As a project base
|
||||||
- `npm install --save discord.io`
|
- Fork/clone/merge this repo into a new one
|
||||||
- `npm shrinkwrap --dev`
|
- Run `npm init` to re-initialise as the new repo
|
||||||
- `shrinkpack .`
|
- Run `npm install`
|
||||||
- Create *token.json* with your discord token: `{ "token": "1234567890" }`
|
- 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
|
## Creating a bot module
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ const Console = require("console");
|
||||||
//external module imports
|
//external module imports
|
||||||
var Discord = require("discord.io");
|
var Discord = require("discord.io");
|
||||||
|
|
||||||
var BotModules = [require("../app/index.js")];
|
var BotModules = [];
|
||||||
|
|
||||||
var bot;
|
var bot;
|
||||||
|
|
||||||
|
|
BIN
wrapper/node_shrinkwrap/cjopus-0.0.4.tar
Normal file
BIN
wrapper/node_shrinkwrap/cjopus-0.0.4.tar
Normal file
Binary file not shown.
BIN
wrapper/node_shrinkwrap/discord.io-2.5.1.tar
Normal file
BIN
wrapper/node_shrinkwrap/discord.io-2.5.1.tar
Normal file
Binary file not shown.
BIN
wrapper/node_shrinkwrap/options-0.0.6.tar
Normal file
BIN
wrapper/node_shrinkwrap/options-0.0.6.tar
Normal file
Binary file not shown.
BIN
wrapper/node_shrinkwrap/tweetnacl-0.14.5.tar
Normal file
BIN
wrapper/node_shrinkwrap/tweetnacl-0.14.5.tar
Normal file
Binary file not shown.
BIN
wrapper/node_shrinkwrap/ultron-1.0.2.tar
Normal file
BIN
wrapper/node_shrinkwrap/ultron-1.0.2.tar
Normal file
Binary file not shown.
BIN
wrapper/node_shrinkwrap/ws-1.1.4.tar
Normal file
BIN
wrapper/node_shrinkwrap/ws-1.1.4.tar
Normal file
Binary file not shown.
36
wrapper/npm-shrinkwrap.json
generated
36
wrapper/npm-shrinkwrap.json
generated
|
@ -1,4 +1,36 @@
|
||||||
{
|
{
|
||||||
"name": "node-boilerplate",
|
"name": "discord-bot",
|
||||||
"version": "1.0.0"
|
"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
23
wrapper/package.json
Normal 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"
|
||||||
|
}
|
Loading…
Reference in a new issue