Include DECTalk

This commit is contained in:
lilyissillyyy
2025-08-31 13:57:32 -04:00
parent 93d6b1f63b
commit eaaaaa7568
9 changed files with 26 additions and 41 deletions
-3
View File
@@ -19,9 +19,6 @@ command-last-run.json
blacklist.json
jeopardy.json
# DECTalk
dectalk/
# Mac Files
.DS_Store
+8 -15
View File
@@ -35,12 +35,6 @@ Yes, several commands and functions rely on it.
Only if you want to use the DECTalk command.
> Where can I find DECTalk?
Good question! I don't even remember where I found it, and I really can't help you. While it's
probably considered abandonware and I doubt anyone would go after a private Discord bot of all
things, I'm not taking any chances.
## Installing
### Filling Out `.env`
@@ -97,15 +91,14 @@ things, I'm not taking any chances.
8. Run `apt install liblqr-1-0-dev liblqr-1-0` to install liblqr (needed for ImageMagick).
9. [Follow these instructions to install ImageMagick](https://www.tecmint.com/install-imagemagick-on-debian-ubuntu/).
10. [Follow these instructions to set up Redis](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04). Remember to set up a password!
11. Download DECTalk and extract `dectalk.dll`, `dtalk_us.dic`, `MSVCRTd.DLL`, and `say.exe` to `dectalk/`. I cannot help you find this.
12. Run `apt install wine` to install wine.
13. Run `dpkg --add-architecture i386` to allow installation of wine32.
14. Run `apt update` again.
15. Run `apt install wine32` to install wine32.
16. Run `apt install xvfb` to install xvfb.
17. Run `yarn install --production` in the folder you cloned the bot.
18. Run `npx parse-domain-update` to update the domain list for `parse-domain`.
19. Start Xiao up!
11. Run `apt install wine` to install wine.
12. Run `dpkg --add-architecture i386` to allow installation of wine32.
13. Run `apt update` again.
14. Run `apt install wine32` to install wine32.
15. Run `apt install xvfb` to install xvfb.
16. Run `yarn install --production` in the folder you cloned the bot.
17. Run `npx parse-domain-update` to update the domain list for `parse-domain`.
18. Start Xiao up!
## Commands
Total: 513
+1 -22
View File
@@ -36,7 +36,7 @@ const client = new Client({
GatewayIntentBits.MessageContent
]
});
const { formatNumber, list, checkFileExists } = require('./util/Util');
const { formatNumber, checkFileExists } = require('./util/Util');
client.registry
.registerDefaultTypes()
@@ -81,27 +81,6 @@ client.on('clientReady', async () => {
const decTalkTmpFolderExists = await checkFileExists(path.join(__dirname, 'tmp', 'dec-talk'));
if (!decTalkTmpFolderExists) await mkdir(path.join(__dirname, 'tmp', 'dec-talk'));
// Check for DECTalk files and disable it if not present
const dectalkFolderExists = await checkFileExists(path.join(__dirname, 'dectalk'));
if (dectalkFolderExists) {
const sayExists = await checkFileExists(path.join(__dirname, 'dectalk', 'say.exe'));
const dicExists = await checkFileExists(path.join(__dirname, 'dectalk', 'dtalk_us.dic'));
const dllExists = await checkFileExists(path.join(__dirname, 'dectalk', 'dectalk.dll'));
const msvExists = await checkFileExists(path.join(__dirname, 'dectalk', 'MSVCRTd.DLL'));
if (!sayExists || !dicExists || !dllExists || !msvExists) {
const missing = [];
if (!sayExists) missing.push('say.exe');
if (!dicExists) missing.push('dtalk_us.dic');
if (!dllExists) missing.push('dectalk.dll');
if (!msvExists) missing.push('MSVCRTd.DLL');
client.registry.commands.get('dec-talk').disable();
client.logger.info(`[DISABLED] ${list(missing)} not present in dectalk/ folder. dectalk has been disabled.`);
}
} else {
client.registry.commands.get('dec-talk').disable();
client.logger.info('[DISABLED] No dectalk/ folder. dectalk has been disabled.');
}
// Check for API keys and disable commands that need them if not present
if (!process.env.REDIS_HOST || !process.env.REDIS_PASS) {
client.logger.error('[REDIS] No REDIS_HOST or REDIS_PASS in env. Exiting process.');
Binary file not shown.
+16
View File
@@ -0,0 +1,16 @@
Copyright (c) 2000, 2001 by Force Computers, Inc.
Certain portions (c) 1999 Compaq Computer Corporation.
All rights reserved.
The Force logo and DECtalk are trademarks of Force Computers, Inc.
Compaq is a registered trademark of Compaq Computer Corporation.
Intel is a trademark of Intel Corporation.
Linux is a registered trademark of Linus Torvalds.
Microsoft, Windows, Windows 95, Windows 98, Windows ME, Windows NT,
Windows 2000, and Windows CE are registered trademarks of Microsoft
Corporation.
Red Hat is a registered trademark of Red Hat Software, Inc.
Other product names mentioned herein may be trademarks and/or
registered trademarks of their respective companies.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "155.0.0",
"version": "155.0.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {