mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Add ability to turn off dating feature
This commit is contained in:
@@ -28,6 +28,7 @@ SUPPORT_EMOJI_ID=
|
|||||||
DAMAGE_EMOJI_ID=
|
DAMAGE_EMOJI_ID=
|
||||||
|
|
||||||
# Dating info
|
# Dating info
|
||||||
|
DATING_OFF=
|
||||||
DATING_ALBUM_ID=
|
DATING_ALBUM_ID=
|
||||||
DATING_NAME=
|
DATING_NAME=
|
||||||
DATING_AGE=
|
DATING_AGE=
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ simply switch to basic text.
|
|||||||
This is the hilarious section that determines what comes out of the
|
This is the hilarious section that determines what comes out of the
|
||||||
`dating` command.
|
`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_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_NAME` is the name you want to go by in the command.
|
||||||
* `DATING_AGE` is the age you want to display 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 ImgurAlbumCommand = require('../../structures/commands/ImgurAlbum');
|
||||||
const { stripIndents } = require('common-tags');
|
const { stripIndents } = require('common-tags');
|
||||||
const texts = require('../../assets/json/dating');
|
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 {
|
module.exports = class DatingCommand extends ImgurAlbumCommand {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -17,6 +25,7 @@ module.exports = class DatingCommand extends ImgurAlbumCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
generateText() {
|
generateText() {
|
||||||
|
if (DATING_OFF) return 'The dating feature is currently inactive. Check back soon!';
|
||||||
const text = texts[Math.floor(Math.random() * texts.length)];
|
const text = texts[Math.floor(Math.random() * texts.length)];
|
||||||
return stripIndents`
|
return stripIndents`
|
||||||
**${DATING_NAME}, ${DATING_AGE}**
|
**${DATING_NAME}, ${DATING_AGE}**
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "119.23.2",
|
"version": "119.23.3",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user