Browse Source

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:   "???"
shorten
benji7425 4 years ago
parent
commit
9430f4f0db
  1. 10
      wrapper/.gitignore
  2. 4
      wrapper/.gitrepo
  3. 2
      wrapper/.npmrc
  4. 20
      wrapper/README.md
  5. 2
      wrapper/index.js
  6. BIN
      wrapper/node_shrinkwrap/cjopus-0.0.4.tar
  7. BIN
      wrapper/node_shrinkwrap/discord.io-2.5.1.tar
  8. BIN
      wrapper/node_shrinkwrap/options-0.0.6.tar
  9. BIN
      wrapper/node_shrinkwrap/tweetnacl-0.14.5.tar
  10. BIN
      wrapper/node_shrinkwrap/ultron-1.0.2.tar
  11. BIN
      wrapper/node_shrinkwrap/ws-1.1.4.tar
  12. 36
      wrapper/npm-shrinkwrap.json
  13. 23
      wrapper/package.json

10
wrapper/.gitignore

@ -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
@ -51,9 +50,4 @@ jspm_packages
*.tgz
# 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
.yarn-integrity

4
wrapper/.gitrepo

@ -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

2
wrapper/.npmrc

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

20
wrapper/README.md

@ -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

2
wrapper/index.js

@ -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;

BIN
wrapper/node_shrinkwrap/cjopus-0.0.4.tar

BIN
wrapper/node_shrinkwrap/discord.io-2.5.1.tar

BIN
wrapper/node_shrinkwrap/options-0.0.6.tar

BIN
wrapper/node_shrinkwrap/tweetnacl-0.14.5.tar

BIN
wrapper/node_shrinkwrap/ultron-1.0.2.tar

BIN
wrapper/node_shrinkwrap/ws-1.1.4.tar

36
wrapper/npm-shrinkwrap.json

@ -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

@ -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…
Cancel
Save