refactoring (#4)

This commit is contained in:
2021-04-10 19:17:18 +02:00
committed by GitHub
parent 9cf66c7435
commit 24a07c4588
21 changed files with 240 additions and 173 deletions

View File

@ -1,6 +1,7 @@
const globals = require('../globals');
const Random = require('random');
//const Random = require('random');
const { roll } = require('@dsabot/Roll');
const { findMessage }= require('@dsabot/findMessage');
module.exports = {
name: 'kopf',
@ -10,8 +11,9 @@ module.exports = {
needs_args: false,
async exec(message, args) {
Random.use(message.author.tag);
const coin = Random.int(0, 1);
message.reply('Die Münze bleibt auf **' + globals.Coin[coin] + '** liegen.');
//Random.use(message.author.tag);
const coin = roll(1,2,message.author.tag).dice; //Random.int(0, 1);
// message.reply('Die Münze bleibt auf **' + globals.Coin[coin] + '** liegen.');
message.reply(`${findMessage('HEADS_OR_TAILS')} **${globals.Coin[(coin-1)]}**.`);
},
};