Simp-O-Matic

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

choose.ts (239B)


1
2
3
4
5
6
7
export default (homescope: HomeScope) => {
	const { message, args } = homescope;
	const a = args.length
		? args.join(' ').split(/\s*(?:,|\bor\b)\s*/gi)
		: [ 'I need a list.' ];
	message.reply(a[Math.floor(Math.random() * a.length)]);
};