mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Add ability to turn off dating feature
This commit is contained in:
@@ -28,6 +28,7 @@ SUPPORT_EMOJI_ID=
|
||||
DAMAGE_EMOJI_ID=
|
||||
|
||||
# Dating info
|
||||
DATING_OFF=
|
||||
DATING_ALBUM_ID=
|
||||
DATING_NAME=
|
||||
DATING_AGE=
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "119.23.2",
|
||||
"version": "119.23.3",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user