Added Rock, Paper, Scissors.
This commit is contained in:
@@ -16,8 +16,8 @@ function onCommand(args, context) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rolls > config.dice.maxFaces) {
|
||||
context.sendMessage(`Your dice can have at most ${config.dice.maxFace} faces`, context.room.id);
|
||||
if (faces > config.dice.maxFaces) {
|
||||
context.sendMessage(`Your dice can have at most ${config.dice.maxFaces} faces`, context.room.id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -28,10 +28,11 @@ function onCommand(args, context) {
|
||||
return `${style.grey(dieFaces[result - 1] || '☐')} ${style.bold(result)}`; // eslint-disable-line no-irregular-whitespace
|
||||
});
|
||||
|
||||
context.sendMessage(results.join(' | '), context.room.id);
|
||||
context.sendMessage(results.join(style.grey(' | ')), context.room.id);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
onCommand,
|
||||
commands: ['dice', 'die', 'roll'],
|
||||
help: 'What\'s your next move? Try ~dice [rolls] [faces], ~die or ~roll',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user