From: Ruben Beltran del Rio Date: Tue, 8 Jun 2021 11:03:18 +0000 (+0200) Subject: Add mask rules X-Git-Url: https://git.r.bdr.sh/rbdr/corona-regeln/commitdiff_plain/10129c006c73d9667a4eb2b45bf0aae7e6cdecdb Add mask rules --- diff --git a/lib/rules/mask.js b/lib/rules/mask.js new file mode 100644 index 0000000..230cc27 --- /dev/null +++ b/lib/rules/mask.js @@ -0,0 +1,51 @@ +const internals ={ + + masks: [ + 'HTML', + 'FFP4', + 'leather', + 'denim', + 'pink', + 'RSVP', + 'TBD', + 'quantum', + 'medical', + 'GMO', + 'FFP9', + 'FFP2.5', + 'KN96', + 'France98', + 'mesh', + ], + + condition: [ + 'when dancing', + 'at all times', + 'in bed', + 'outdoors', + 'when running', + 'when driving', + 'when cycling', + 'in restaurants', + 'in pools', + 'in small groups', + 'at 3pm', + 'at 5pm', + 'when nobody is looking', + 'around the police', + 'when speaking', + 'while chewing gum', + 'while eating bread', + ] +}; + +module.exports = () => { + + const mask = internals.masks[Math.floor(Math.random() * internals.masks.length)]; + const condition = internals.conditions[Math.floor(Math.random() * internals.conditions.length)]; + + return { + emoji: '😷', + text: `${mask} masks must be worn ${condition}` + }; +}