Add ability to turn off dating feature

This commit is contained in:
Dragon Fire
2020-09-08 10:00:22 -04:00
parent 5f8719914e
commit a51f666fbd
4 changed files with 13 additions and 2 deletions
+1
View File
@@ -28,6 +28,7 @@ SUPPORT_EMOJI_ID=
DAMAGE_EMOJI_ID=
# Dating info
DATING_OFF=
DATING_ALBUM_ID=
DATING_NAME=
DATING_AGE=
+1
View File
@@ -174,6 +174,7 @@ simply switch to basic text.
This is the hilarious section that determines what comes out of the
`dating` command.
* `DATING_OFF` completely turns off the dating feature. Put anything here and it's off.
* `DATING_ALBUM_ID` is an Imgur album ID (see #imgur-album-ids) that includes the photos you want to send in the command.
* `DATING_NAME` is the name you want to go by in the command.
* `DATING_AGE` is the age you want to display in the command.
+10 -1
View File
@@ -1,7 +1,15 @@
const ImgurAlbumCommand = require('../../structures/commands/ImgurAlbum');
const { stripIndents } = require('common-tags');
const texts = require('../../assets/json/dating');
const { DATING_ALBUM_ID, DATING_NAME, DATING_AGE, DATING_TAG, DATING_ORIENTATION, DATING_SERIOUS } = process.env;
const {
DATING_OFF,
DATING_ALBUM_ID,
DATING_NAME,
DATING_AGE,
DATING_TAG,
DATING_ORIENTATION,
DATING_SERIOUS
} = process.env;
module.exports = class DatingCommand extends ImgurAlbumCommand {
constructor(client) {
@@ -17,6 +25,7 @@ module.exports = class DatingCommand extends ImgurAlbumCommand {
}
generateText() {
if (DATING_OFF) return 'The dating feature is currently inactive. Check back soon!';
const text = texts[Math.floor(Math.random() * texts.length)];
return stripIndents`
**${DATING_NAME}, ${DATING_AGE}**
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "119.23.2",
"version": "119.23.3",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {