commit 60cf4ef5dfa152827c1f85e69960da505ecdd0f5
parent b946ead85a8b3952743288bf150ac86c641bfce6
Author: Fredrik <moi@knutsen.co>
Date:   Wed, 27 May 2020 18:02:35 +0100
Merge pull request #13 from Shiimoe/master
added kill command
Diffstat:
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/lib/action.ts b/lib/action.ts
@@ -1,7 +1,7 @@
 import { FORMATS } from './extensions';
 import { Message, MessageEmbed } from 'discord.js';
 
-type ActionType = 'kiss' | 'suck' | 'rape' | 'slap' | 'hug' | 'lick' | 'rim';
+type ActionType = 'kiss' | 'suck' | 'rape' | 'slap' | 'hug' | 'lick' | 'rim' | 'kill';
 
 interface Actions {
 	title: string;
@@ -138,7 +138,16 @@ const ACTIONS: Record<ActionType, Actions> = {
 			"https://img2.gelbooru.com/images/94/83/94833376ed7271f08c75385204fbcd1f.gif",
 			"https://img.rule34.xxx//images/1149/9362d2e884efc6e49b665be3268d4f02d66674a3.gif?1148722",
 		]
-	}
+	},
+	kill: {
+		title: "You have died.",
+		message: "killed",
+		emoji: 'skull',
+		images: [
+			"https://img2.gelbooru.com/images/7c/9c/7c9cdd15e03df0a2ba06b9bb9aa98180.png",
+		],
+		transitiveness: true
+	}	
 };
 
 export default class Action {
diff --git a/lib/commands/kill.ts b/lib/commands/kill.ts
@@ -0,0 +1,12 @@
+import { Message } from 'discord.js';
+import Action from '../action';
+
+export default (home_scope: HomeScope) => {
+	const { message, args }
+			: { message: Message, args: string[] } = home_scope;
+
+	if (args.length === 0 || message.mentions.users.size === 0)
+		return message.channel.send("You killed yoursef.");
+
+	message.channel.send(Action.get('kill', message));
+};