From 4a18810d3a36bd297e64d02a7848a83a3963c03b Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Mon, 12 Feb 2018 23:26:58 +0000 Subject: [PATCH] Remove home server stuff --- Xiao.js | 3 +-- commands/role-manage/role-list.js | 26 ---------------------- commands/role-manage/subscribe.js | 34 ----------------------------- commands/role-manage/unsubscribe.js | 34 ----------------------------- package.json | 2 +- 5 files changed, 2 insertions(+), 97 deletions(-) delete mode 100644 commands/role-manage/role-list.js delete mode 100644 commands/role-manage/subscribe.js delete mode 100644 commands/role-manage/unsubscribe.js diff --git a/Xiao.js b/Xiao.js index cd1dcced..e2fd4dee 100644 --- a/Xiao.js +++ b/Xiao.js @@ -29,8 +29,7 @@ client.registry ['text-edit', 'Text Manipulation'], ['number-edit', 'Number Manipulation'], ['other', 'Other'], - ['roleplay', 'Roleplay'], - ['role-manage', 'Home Server Role Management'] + ['roleplay', 'Roleplay'] ]) .registerDefaultCommands({ help: false, diff --git a/commands/role-manage/role-list.js b/commands/role-manage/role-list.js deleted file mode 100644 index c0b1508c..00000000 --- a/commands/role-manage/role-list.js +++ /dev/null @@ -1,26 +0,0 @@ -const { Command } = require('discord.js-commando'); -const { stripIndents } = require('common-tags'); -const { HOME_GUILD_ID, HOME_GUILD_ROLES } = process.env; -const roles = HOME_GUILD_ROLES.split(','); - -module.exports = class RoleListCommand extends Command { - constructor(client) { - super(client, { - name: 'role-list', - aliases: ['roles'], - group: 'role-manage', - memberName: 'role-list', - description: 'Responds with all available roles to join in the home server.', - details: 'This command only works in the home server.', - guildOnly: true - }); - } - - run(msg) { - if (msg.guild.id !== HOME_GUILD_ID) return msg.reply('This command only works in the home server.'); - return msg.say(stripIndents` - **Roles available in ${msg.guild.name}**: - ${msg.guild.roles.filter(role => roles.includes(role.id)).map(role => role.name).join('\n')} - `); - } -}; diff --git a/commands/role-manage/subscribe.js b/commands/role-manage/subscribe.js deleted file mode 100644 index 5421abda..00000000 --- a/commands/role-manage/subscribe.js +++ /dev/null @@ -1,34 +0,0 @@ -const { Command } = require('discord.js-commando'); -const { HOME_GUILD_ID, HOME_GUILD_ROLES } = process.env; -const roles = HOME_GUILD_ROLES.split(','); - -module.exports = class SubscribeCommand extends Command { - constructor(client) { - super(client, { - name: 'subscribe', - aliases: ['join'], - group: 'role-manage', - memberName: 'subscribe', - description: 'Subscribes you to the specified role.', - details: 'This command only works in the home server.', - guildOnly: true, - clientPermissions: ['MANAGE_ROLES'], - args: [ - { - key: 'role', - prompt: 'What role do you want to subscribe to?', - type: 'role' - } - ] - }); - } - - async run(msg, { role }) { - if (msg.guild.id !== HOME_GUILD_ID) return msg.reply('This command only works in the home server.'); - if (!roles.includes(role.id)) return msg.reply('This role is not open!'); - if (!role.editable) return msg.reply('I do not have permission to manage this role!'); - if (msg.member.roles.has(role.id)) return msg.reply('You are already a member of this role!'); - await msg.member.roles.add(role); - return msg.say(`You were added to **${role.name}**!`); - } -}; diff --git a/commands/role-manage/unsubscribe.js b/commands/role-manage/unsubscribe.js deleted file mode 100644 index b3389fb7..00000000 --- a/commands/role-manage/unsubscribe.js +++ /dev/null @@ -1,34 +0,0 @@ -const { Command } = require('discord.js-commando'); -const { HOME_GUILD_ID, HOME_GUILD_ROLES } = process.env; -const roles = HOME_GUILD_ROLES.split(','); - -module.exports = class UnsubscribeCommand extends Command { - constructor(client) { - super(client, { - name: 'unsubscribe', - aliases: ['leave'], - group: 'role-manage', - memberName: 'unsubscribe', - description: 'Unsubscribes you from the specified role.', - details: 'This command only works in the home server.', - guildOnly: true, - clientPermissions: ['MANAGE_ROLES'], - args: [ - { - key: 'role', - prompt: 'What role do you want to unsubscribe from?', - type: 'role' - } - ] - }); - } - - async run(msg, { role }) { - if (msg.guild.id !== HOME_GUILD_ID) return msg.reply('This command only works in the home server.'); - if (!roles.includes(role.id)) return msg.reply('This role is not open!'); - if (!role.editable) return msg.reply('I do not have permission to manage this role!'); - if (!msg.member.roles.has(role.id)) return msg.reply('You are not a member of this role!'); - await msg.member.roles.remove(role); - return msg.say(`You were removed from **${role.name}**...`); - } -}; diff --git a/package.json b/package.json index 138616c8..3c0e47c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "62.5.1", + "version": "63.0.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {