Simp-O-Matic

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

commit fb3f1520d990576796014ef1618d02c859660517
parent 89e2dddb877b21b3ff40c4e1f58a311e0dca9b47
Author: Demonstrandum <moi@knutsen.co>
Date:   Thu, 19 Mar 2020 15:53:11 +0000

Merge branch 'master' of github.com:Demonstrandum/Simp-O-Matic

Diffstat:
Mlib/commands/kiss.ts | 14+++++++++++++-
Mlib/commands/mock.ts | 4++--
2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/lib/commands/kiss.ts b/lib/commands/kiss.ts @@ -11,13 +11,25 @@ export default home_scope => { const author = message.author.username; const to = message.mentions.users.first().username; + + const images = [ + "https://i.imgur.com/a5rkTna.gif", + "https://i.imgur.com/AnYC2Xi.gif", + "https://i.imgur.com/9PbQ9Zl.gif", + "https://i.imgur.com/QZhWnaf.gif", + "https://i.imgur.com/1PEBQB6.gif", + "https://i.imgur.com/qW6BWEn.gif", + "https://i.imgur.com/79hpwpn.gif", + "https://i.imgur.com/RpxJYVD.gif", + "https://i.imgur.com/8fcnQFS.gif", + ]; const embed = new RichEmbed() .setColor('#ba3d8a') .setTitle("Uh-oh... You're getting a kiss!") .setDescription(`${to.format(FORMATS.bold)}, you got a kissu from \ ${author.format(FORMATS.bold)}! :flushed:`.squeeze()) - .setImage('https://i.imgur.com/lz1BY2x.gif'); + .setImage(images[Math.floor(Math.random() * images.length)]); message.channel.send(embed); }; diff --git a/lib/commands/mock.ts b/lib/commands/mock.ts @@ -2,8 +2,8 @@ export default home_scope => { // TODO: if no args, mock the previous message, // but this could be implemented via .alias and !!^. const { message, args } = home_scope; - let b = false; - message.reply([...args.join(' ').toLowerCase()].map(l => + let b = true; + message.channel.send([...args.join(' ').toLowerCase()].map(l => (l === l.toUpperCase()) ? l : ((b = !b) ? l.toUpperCase() : l) ).join('') || 'sAy SoMeThInG wIlL yA?'); };