In the example bot.js you show loading a plugin with only one arg, e.g. b.loadPlugin('dice');.
However this will error on the line:
pl.cmdPrefix = options.cmdprefix && options.cmdprefix[0] ? options.cmdprefix[0] : '!';
with 'Cannot read property 'cmdprefix' of undefined'.
That line should probably read something like:
pl.cmdPrefix = options && options.cmdprefix && options.cmdprefix[0] ? options.cmdprefix[0] : '!';
In the mean time the work around is using b.loadPlugin('dice', {});.
In the example bot.js you show loading a plugin with only one arg, e.g.
b.loadPlugin('dice');.However this will error on the line:
pl.cmdPrefix = options.cmdprefix && options.cmdprefix[0] ? options.cmdprefix[0] : '!';with 'Cannot read property 'cmdprefix' of undefined'.
That line should probably read something like:
pl.cmdPrefix = options && options.cmdprefix && options.cmdprefix[0] ? options.cmdprefix[0] : '!';In the mean time the work around is using
b.loadPlugin('dice', {});.