Skip to content

Commit

Permalink
Update to latest yamdbf and discord.js
Browse files Browse the repository at this point in the history
  • Loading branch information
zajrik committed Aug 21, 2018
1 parent ff3f43f commit 53a0387
Show file tree
Hide file tree
Showing 11 changed files with 306 additions and 2,067 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ test_*.js
/scripts/**/*.js
/scripts/**/*.d.ts
/scripts/storage
*.sqlite
*.sqlite
yarn.lock
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib"
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Before anything else you need to create an empty guild and invite your bot to it
Then you must make sure the bot has `Manage Channels` and `Manage Messages` permissions
in the guild. After that need to import `dmManager` from the module and pass it to your
YAMDBF Client plugins array in your YAMDBF Client options with the id of the guild you
set up
set up, as well as a default channel within this guild to use for sending errors to.

```js
const { Client } = require('yamdbf');
const { dmManager } = require('yamdbf-dm-manager');
...
const client = new Client({
...
plugins: [dmManager('guildID')]
plugins: [dmManager('guildID', 'defaultChannelID')]
});
```

Expand Down
21 changes: 13 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ const linter = () => _linter = _linter || tslint().Linter.createProgram('tsconfi

gulp.task('default', ['build']);
gulp.task('build:vscode', cb => runSequence()('lint', 'build', cb));
gulp.task('gh-prebuild', cb => runSequence()('build', 'gh-prebuild-prepare', cb));

gulp.task('pause', cb => setTimeout(() => cb(), 1e3));
gulp.task('tests', cb => runSequence()('lint', 'build', 'pause', 'build:tests', cb));
gulp.task('pkg', cb => runSequence()('build', 'pause', 'pause', 'package', cb));

gulp.task('lint', () => {
gulp.src('src/**/*.ts')
Expand Down Expand Up @@ -51,12 +51,17 @@ gulp.task('build', () => {
.pipe(gulp.dest('bin/'));
});

gulp.task('package', () => {
del.sync(['../pkg/yamdbf-dm-manager/**/*.*'], { force: true });
gulp.src('bin/**/*.*').pipe(gulp.dest('../pkg/yamdbf-dm-manager/bin'));
gulp.src('package.json').pipe(gulp.dest('../pkg/yamdbf-dm-manager'));
gulp.src('README.md').pipe(gulp.dest('../pkg/yamdbf-dm-manager'));
});
gulp.task('gh-prebuild-prepare', () => {
del.sync([
'../prebuild/**',
'../prebuild/.*',
'!../prebuild',
'!../prebuild/.git',
'!../prebuild/.git/**'
], { force: true });
gulp.src('bin/**/*.*').pipe(gulp.dest('../prebuild/bin'));
gulp.src('package.json').pipe(gulp.dest('../prebuild'));
})

gulp.task('build:tests', () => {
del.sync(['test/**/*.js']);
Expand All @@ -70,4 +75,4 @@ gulp.task('build:tests', () => {
.pipe(gulp_sourcemaps.mapSources(sourcePath => path.join(__dirname, 'test', sourcePath)))
.pipe(gulp_sourcemaps.write())
.pipe(gulp.dest('test/'));
});
});
Loading

0 comments on commit 53a0387

Please sign in to comment.