Simp-O-Matic

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

summon.ts (562B)


import { help_info } from '../utils';

export default (homescope : HomeScope) => {
	const { message, args, CONFIG } = homescope;

	if (args.length === 0 || args[0] === 'help'
	|| message.mentions.users.size === 0)
		return message.reply(help_info('summon', CONFIG.commands.prefix));

	message.client.users.fetch(message.mentions.users.first().id)
		.then(user => user.send(
			`Psssst. Hey, come over to ${message.guild.name} :point_left:\n`
			+ `(${message.member.user.tag} is trying to summon you).`))
		.catch(err => {
			message.channel.send(err);
		});
};