mirror of
https://github.com/DarthKilroy/Spot.git
synced 2025-12-22 11:46:49 +00:00
Added commands, fixed descriptions and titles
This commit is contained in:
parent
8ae81f1cc6
commit
3ef02c33bd
6 changed files with 157 additions and 4 deletions
|
|
@ -15,7 +15,7 @@ class Clean
|
||||||
this.aliases = ['clear', 'purge'];
|
this.aliases = ['clear', 'purge'];
|
||||||
this.category = CommandCategory.MODERATION;
|
this.category = CommandCategory.MODERATION;
|
||||||
this.isAllowedForContext = CommandPermission.isMemberMod;
|
this.isAllowedForContext = CommandPermission.isMemberMod;
|
||||||
this.description = 'Kills the bot process';
|
this.description = 'Deletes messages in a bulk.';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
39
model/command/custom-fields.js
Normal file
39
model/command/custom-fields.js
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
const CommandCategory = require('../command-category');
|
||||||
|
const CommandPermission = require('../command-permission');
|
||||||
|
|
||||||
|
class CustomFields
|
||||||
|
{
|
||||||
|
static instance = null;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
if (CustomFields.instance !== null) {
|
||||||
|
return CustomFields.instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.aliases = ['custom-fields', 'customfields', 'customfield', 'cfi'];
|
||||||
|
this.category = CommandCategory.RESOURCE;
|
||||||
|
this.isAllowedForContext = CommandPermission.yes;
|
||||||
|
this.description = 'Talks about the "custom fields" feature.';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Message} message
|
||||||
|
* @param {Array} args
|
||||||
|
*/
|
||||||
|
async process(message, args) {
|
||||||
|
const embed = new MessageEmbed();
|
||||||
|
|
||||||
|
embed.setColor(APP_MAIN_COLOUR);
|
||||||
|
embed.setAuthor('Custom fields', bot.user.displayAvatarURL({ dynamic: true }));
|
||||||
|
embed.setDescription(
|
||||||
|
'The ability to change the fields shown on your member lists is planned. This feature will also bring ' +
|
||||||
|
'the ability to remove and add fields, as well as make fields private, public, or show them to only ' +
|
||||||
|
'trusted friends.'
|
||||||
|
);
|
||||||
|
|
||||||
|
return message.channel.send(embed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = new CustomFields();
|
||||||
|
|
@ -12,7 +12,7 @@ class CustomFront
|
||||||
}
|
}
|
||||||
|
|
||||||
this.aliases = ['custom-fronts', 'customfronts', 'customfront', 'cf'];
|
this.aliases = ['custom-fronts', 'customfronts', 'customfront', 'cf'];
|
||||||
this.category = CommandCategory.FUN;
|
this.category = CommandCategory.RESOURCE;
|
||||||
this.isAllowedForContext = CommandPermission.yes;
|
this.isAllowedForContext = CommandPermission.yes;
|
||||||
this.description = 'Explains what "custom front" is.';
|
this.description = 'Explains what "custom front" is.';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
53
model/command/front-history-importing.js
Normal file
53
model/command/front-history-importing.js
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
const CommandCategory = require('../command-category');
|
||||||
|
const CommandPermission = require('../command-permission');
|
||||||
|
|
||||||
|
class FrontHistoryImporting
|
||||||
|
{
|
||||||
|
static instance = null;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
if (FrontHistoryImporting.instance !== null) {
|
||||||
|
return FrontHistoryImporting.instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.aliases = [
|
||||||
|
'fronthistoryimporting',
|
||||||
|
'fronthistory-importing',
|
||||||
|
'front-historyimporting',
|
||||||
|
'fronthistoryimport',
|
||||||
|
'fronthistory-import',
|
||||||
|
'front-historyimport',
|
||||||
|
'front-history',
|
||||||
|
'fronthistory',
|
||||||
|
'front-importing',
|
||||||
|
'frontimporting',
|
||||||
|
'front-import',
|
||||||
|
'frontimport',
|
||||||
|
'fhi',
|
||||||
|
];
|
||||||
|
this.category = CommandCategory.RESOURCE;
|
||||||
|
this.isAllowedForContext = CommandPermission.yes;
|
||||||
|
this.description = 'Talks about importing the front history from PluralKit.';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Message} message
|
||||||
|
* @param {Array} args
|
||||||
|
*/
|
||||||
|
async process(message, args) {
|
||||||
|
const embed = new MessageEmbed();
|
||||||
|
|
||||||
|
embed.setColor(APP_MAIN_COLOUR);
|
||||||
|
embed.setAuthor('Front history importing', bot.user.displayAvatarURL({ dynamic: true }));
|
||||||
|
embed.setDescription(
|
||||||
|
'Importing your front history from PluralKit is planned in the future, but is currently impossible ' +
|
||||||
|
'until APIv2 for PluralKit is finished. This feature also takes a lower priority than features unique ' +
|
||||||
|
'to Simply Plural.'
|
||||||
|
);
|
||||||
|
|
||||||
|
return message.channel.send(embed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = new FrontHistoryImporting();
|
||||||
|
|
@ -24,9 +24,19 @@ class HelpDialog
|
||||||
this.categoriesEmbed = new Discord.MessageEmbed();
|
this.categoriesEmbed = new Discord.MessageEmbed();
|
||||||
this.originalMessage = message;
|
this.originalMessage = message;
|
||||||
this.categoryCommandMapping = new Discord.Collection();
|
this.categoryCommandMapping = new Discord.Collection();
|
||||||
|
this.categoryColourMapping = new Discord.Collection();
|
||||||
this.postedMessage = null;
|
this.postedMessage = null;
|
||||||
this.usedEmojis = [];
|
this.usedEmojis = [];
|
||||||
this.stopAddingReactions = false;
|
this.stopAddingReactions = false;
|
||||||
|
|
||||||
|
this.categoriesEmbed.setColor(APP_MAIN_COLOUR);
|
||||||
|
this.categoriesEmbed.setFooter('Click on one of the reactions below');
|
||||||
|
|
||||||
|
for (let category of Object.values(CommandCategory)) {
|
||||||
|
this.categoryColourMapping.set(category, APP_MAIN_COLOUR);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.categoryColourMapping.set(CommandCategory.RESOURCE, 'fdfd96');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -71,7 +81,16 @@ class HelpDialog
|
||||||
}, '');
|
}, '');
|
||||||
|
|
||||||
this.categoriesEmbed.setTitle('Help command');
|
this.categoriesEmbed.setTitle('Help command');
|
||||||
this.categoriesEmbed.setDescription(categories);
|
this.categoriesEmbed.setDescription(
|
||||||
|
'Spot stands for **S**imply **P**lural b**ot**. This bot is mainly used to generate changelogs and help ' +
|
||||||
|
'with the definition of features, so recurring questions can be answered more quickly.\n' +
|
||||||
|
'\n' +
|
||||||
|
'Commands are classified by categories because displaying every command in this small box would be ' +
|
||||||
|
'confusing and would break Discord\'s character limit. Click on a reaction to show the commands ' +
|
||||||
|
'available in the corresponding category.\n' +
|
||||||
|
'\n' +
|
||||||
|
categories
|
||||||
|
);
|
||||||
|
|
||||||
return this.listCategories();
|
return this.listCategories();
|
||||||
}
|
}
|
||||||
|
|
@ -139,6 +158,8 @@ class HelpDialog
|
||||||
|
|
||||||
commandsEmbed.setTitle('Help command');
|
commandsEmbed.setTitle('Help command');
|
||||||
commandsEmbed.setDescription(commands);
|
commandsEmbed.setDescription(commands);
|
||||||
|
commandsEmbed.setColor(this.categoryColourMapping.get(category));
|
||||||
|
commandsEmbed.setFooter('Click on one of the reactions below');
|
||||||
|
|
||||||
this.postedMessage.edit('', commandsEmbed);
|
this.postedMessage.edit('', commandsEmbed);
|
||||||
|
|
||||||
|
|
@ -158,7 +179,7 @@ class Help
|
||||||
return Help.instance;
|
return Help.instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.aliases = [];
|
this.aliases = ['commands'];
|
||||||
this.category = CommandCategory.INFO;
|
this.category = CommandCategory.INFO;
|
||||||
this.isAllowedForContext = CommandPermission.yes;
|
this.isAllowedForContext = CommandPermission.yes;
|
||||||
this.description = 'Provides the list of commands';
|
this.description = 'Provides the list of commands';
|
||||||
|
|
|
||||||
40
model/command/system-relationships.js
Normal file
40
model/command/system-relationships.js
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
const CommandCategory = require('../command-category');
|
||||||
|
const CommandPermission = require('../command-permission');
|
||||||
|
|
||||||
|
class SystemRelationships
|
||||||
|
{
|
||||||
|
static instance = null;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
if (SystemRelationships.instance !== null) {
|
||||||
|
return SystemRelationships.instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.aliases = ['system-relationship', 'systemrelationships', 'systemrelationships', 'sr'];
|
||||||
|
this.category = CommandCategory.RESOURCE;
|
||||||
|
this.isAllowedForContext = CommandPermission.yes;
|
||||||
|
this.description = 'Explains what "system relationships" are.';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Message} message
|
||||||
|
* @param {Array} args
|
||||||
|
*/
|
||||||
|
async process(message, args) {
|
||||||
|
const embed = new MessageEmbed();
|
||||||
|
|
||||||
|
embed.setColor(APP_MAIN_COLOUR);
|
||||||
|
embed.setAuthor('System relationships', bot.user.displayAvatarURL({ dynamic: true }));
|
||||||
|
embed.setDescription(
|
||||||
|
'This is an open-ended field meant to describe what relationships a headmate has. It can be used to ' +
|
||||||
|
'describe the member\'s relationship to the system as a whole, their inner system relationships such as ' +
|
||||||
|
'being family, friends, or romantic partners, or it can describe their outer-system relationships with ' +
|
||||||
|
'people in the outer world, such as family, friends, and romantic partners.'
|
||||||
|
);
|
||||||
|
|
||||||
|
return message.channel.send(embed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = new SystemRelationships();
|
||||||
Loading…
Add table
Add a link
Reference in a new issue