Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

commit 5893560d4a45084024dcfd7363f5d3d4f693d673
parent d7d635154f51b922068e9eeacd09bfb7939f92d2
Author: Demonstrandum <moi@knutsen.co>
Date:   Thu, 19 Mar 2020 23:34:23 +0000

Felt sneaky.

Diffstat:
Mlib/commands/drug.ts | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/commands/drug.ts b/lib/commands/drug.ts @@ -24,9 +24,11 @@ const drugs = { 'dextromethorphan': [100, 200, 400, 800, 1000], 'kratom': [1000, 5000, 10000], 'memantine': [30, 60, 120, 180] -} +}; + export default home_scope => { const { message } = home_scope; const drug = Object.keys(drugs)[Math.floor(25 * Math.random())]; - message.answer(drugs[drug][Math.floor(Math.random() * drugs[drug].length)] + 'mg ' + drug); -}- \ No newline at end of file + message.answer(`${drugs[drug][Math.floor(Math.random() + * drugs[drug].length)]}mg ${drug}`); +};