From 1b88c0839820302f2998a9ba8fb0d2d364d45635 Mon Sep 17 00:00:00 2001
From: Loic Bersier <loic.bersier1@gmail.com>
Date: Fri, 28 Dec 2018 00:43:33 +0100
Subject: [PATCH] Add slowmode

---
 commands/admin/slowmode.js | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 commands/admin/slowmode.js

diff --git a/commands/admin/slowmode.js b/commands/admin/slowmode.js
new file mode 100644
index 0000000..c2057f1
--- /dev/null
+++ b/commands/admin/slowmode.js
@@ -0,0 +1,26 @@
+const { Command } = require('discord.js-commando');
+
+module.exports = class CustomResponseCommand extends Command {
+    constructor(client) {
+        super(client, {
+            name: 'slowmode',
+            aliases: ['slow'],
+            group: 'admin',
+            memberName: 'slowmode',
+            description: `Custom auto response`,
+            userPermissions: ['MANAGE_CHANNELS'],
+            clientPermissions: ['MANAGE_CHANNELS'],
+            args: [
+                {
+                    key: 'slowmodeNumber',
+                    prompt: 'How many seconds should the slowmode be? ( 0 to remove it )',
+                    type: 'integer',
+                }
+            ]
+        });
+    }
+
+    async run(message, { slowmodeNumber }) {
+        message.channel.setRateLimitPerUser(slowmodeNumber);
+        }
+};
\ No newline at end of file