From a589016041d185be7772877442b931a3bfdd6850 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= <supositware@Loics-MacBook-Pro.local>
Date: Sat, 11 May 2019 20:28:37 +0200
Subject: [PATCH] send a file from the server

---
 commands/owner/sendfile.js | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 commands/owner/sendfile.js

diff --git a/commands/owner/sendfile.js b/commands/owner/sendfile.js
new file mode 100644
index 00000000..dad6cb49
--- /dev/null
+++ b/commands/owner/sendfile.js
@@ -0,0 +1,31 @@
+const { Command } = require('discord-akairo');
+
+class sendfileCommand extends Command {
+	constructor() {
+		super('sendfile', {
+			aliases: ['sendfile'],
+			category: 'owner',
+			ownerOnly: 'true',
+			args: [
+				{
+					id: 'file',
+					type: 'string',
+					match: 'rest'
+				}
+			],
+			description: {
+				content: 'send a file from the server',
+				usage: '[a file on the server]',
+				examples: ['config-exemple.jsonc']
+			}
+		});
+	}
+
+	async exec(message, args) {
+		message.channel.send('Here is your file.', {files: [args.file]}).catch(() =>{
+			return message.channel.send('Could not find the requested file.');
+		});
+	}
+}
+
+module.exports = sendfileCommand;
\ No newline at end of file