Simp-O-Matic

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

mock.ts (376B)


1
2
3
4
5
6
7
8
9
export default (homescope: HomeScope) => {
	// TODO: if no args, mock the previous message,
	//   but this could be implemented via .alias and !!^.
	const { message, args } = homescope;
	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?');
};