commit 1b80d11a2c387c949c8c57eba130565b9f75d9b3 Author: Flummi Date: Sun Dec 31 14:29:10 2023 +0000 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..0da95e0 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,421 @@ +{ + "name": "chatbot", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "chatbot", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "cuffeo": "^1.2.2", + "discord.js": "^14.14.1", + "fetch": "^1.1.0", + "node-fetch": "^3.3.2" + } + }, + "node_modules/@discordjs/builders": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.7.0.tgz", + "integrity": "sha512-GDtbKMkg433cOZur8Dv6c25EHxduNIBsxeHrsRoIM8+AwmEZ8r0tEpckx/sHwTLwQPOF3e2JWloZh9ofCaMfAw==", + "dependencies": { + "@discordjs/formatters": "^0.3.3", + "@discordjs/util": "^1.0.2", + "@sapphire/shapeshift": "^3.9.3", + "discord-api-types": "0.37.61", + "fast-deep-equal": "^3.1.3", + "ts-mixer": "^6.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/collection": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", + "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/formatters": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.3.tgz", + "integrity": "sha512-wTcI1Q5cps1eSGhl6+6AzzZkBBlVrBdc9IUhJbijRgVjCNIIIZPgqnUj3ntFODsHrdbGU8BEG9XmDQmgEEYn3w==", + "dependencies": { + "discord-api-types": "0.37.61" + }, + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/rest": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.2.0.tgz", + "integrity": "sha512-nXm9wT8oqrYFRMEqTXQx9DUTeEtXUDMmnUKIhZn6O2EeDY9VCdwj23XCPq7fkqMPKdF7ldAfeVKyxxFdbZl59A==", + "dependencies": { + "@discordjs/collection": "^2.0.0", + "@discordjs/util": "^1.0.2", + "@sapphire/async-queue": "^1.5.0", + "@sapphire/snowflake": "^3.5.1", + "@vladfrangu/async_event_emitter": "^2.2.2", + "discord-api-types": "0.37.61", + "magic-bytes.js": "^1.5.0", + "tslib": "^2.6.2", + "undici": "5.27.2" + }, + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz", + "integrity": "sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==", + "engines": { + "node": ">=18" + } + }, + "node_modules/@discordjs/util": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.2.tgz", + "integrity": "sha512-IRNbimrmfb75GMNEjyznqM1tkI7HrZOf14njX7tCAAUetyZM1Pr8hX/EK2lxBCOgWDRmigbp24fD1hdMfQK5lw==", + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/ws": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.2.tgz", + "integrity": "sha512-+XI82Rm2hKnFwAySXEep4A7Kfoowt6weO6381jgW+wVdTpMS/56qCvoXyFRY0slcv7c/U8My2PwIB2/wEaAh7Q==", + "dependencies": { + "@discordjs/collection": "^2.0.0", + "@discordjs/rest": "^2.1.0", + "@discordjs/util": "^1.0.2", + "@sapphire/async-queue": "^1.5.0", + "@types/ws": "^8.5.9", + "@vladfrangu/async_event_emitter": "^2.2.2", + "discord-api-types": "0.37.61", + "tslib": "^2.6.2", + "ws": "^8.14.2" + }, + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/ws/node_modules/@discordjs/collection": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz", + "integrity": "sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==", + "engines": { + "node": ">=18" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", + "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@sapphire/async-queue": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.1.tgz", + "integrity": "sha512-1RdpsmDQR/aWfp8oJzPtn4dNQrbpqSL5PIA0uAB/XwerPXUf994Ug1au1e7uGcD7ei8/F63UDjr5GWps1g/HxQ==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@sapphire/shapeshift": { + "version": "3.9.5", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.5.tgz", + "integrity": "sha512-AGdHe+51gF7D3W8hBfuSFLBocURDCXVQczScTHXDS3RpNjNgrktIx/amlz5y8nHhm8SAdFt/X8EF8ZSfjJ0tnA==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v18" + } + }, + "node_modules/@sapphire/snowflake": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz", + "integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@types/node": { + "version": "20.10.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz", + "integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/ws": { + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz", + "integrity": "sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@vladfrangu/async_event_emitter": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.4.tgz", + "integrity": "sha512-ButUPz9E9cXMLgvAW8aLAKKJJsPu1dY1/l/E8xzLFuysowXygs6GBcyunK9rnGC4zTsnIc2mQo71rGw9U+Ykug==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/biskviit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/biskviit/-/biskviit-1.0.1.tgz", + "integrity": "sha512-VGCXdHbdbpEkFgtjkeoBN8vRlbj1ZRX2/mxhE8asCCRalUx2nBzOomLJv8Aw/nRt5+ccDb+tPKidg4XxcfGW4w==", + "dependencies": { + "psl": "^1.1.7" + }, + "engines": { + "node": ">=1.0.0" + } + }, + "node_modules/cuffeo": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cuffeo/-/cuffeo-1.2.2.tgz", + "integrity": "sha512-Pd2AL/Zp5RCAbaSbT7rLUOyxSEVCFovihaIaje7uYzpQMzIwPbFapQ/mn2d2iz+Tbkjs9LF+FD5JzAvANh9Wzw==", + "dependencies": { + "flumm-fetch": "^1.0.1" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/discord-api-types": { + "version": "0.37.61", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz", + "integrity": "sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==" + }, + "node_modules/discord.js": { + "version": "14.14.1", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.14.1.tgz", + "integrity": "sha512-/hUVzkIerxKHyRKopJy5xejp4MYKDPTszAnpYxzVVv4qJYf+Tkt+jnT2N29PIPschicaEEpXwF2ARrTYHYwQ5w==", + "dependencies": { + "@discordjs/builders": "^1.7.0", + "@discordjs/collection": "1.5.3", + "@discordjs/formatters": "^0.3.3", + "@discordjs/rest": "^2.1.0", + "@discordjs/util": "^1.0.2", + "@discordjs/ws": "^1.0.2", + "@sapphire/snowflake": "3.5.1", + "@types/ws": "8.5.9", + "discord-api-types": "0.37.61", + "fast-deep-equal": "3.1.3", + "lodash.snakecase": "4.1.1", + "tslib": "2.6.2", + "undici": "5.27.2", + "ws": "8.14.2" + }, + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha512-bl1LAgiQc4ZWr++pNYUdRe/alecaHFeHxIJ/pNciqGdKXghaTCOwKkbKp6ye7pKZGu/GcaSXFk8PBVhgs+dJdA==", + "dependencies": { + "iconv-lite": "~0.4.13" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-5O8TwrGzoNblBG/jtK4NFuZwNCkZX6s5GfRNOaGtm+QGJEuNakSC/i2RW0R93KX6E0jVjNXm6O3CRN4Ql3K+yA==", + "dependencies": { + "biskviit": "1.0.1", + "encoding": "0.1.12" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/flumm-fetch": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flumm-fetch/-/flumm-fetch-1.0.1.tgz", + "integrity": "sha512-pZ5U0hheCSW43vfGZQMunr03U7rUOX+iy2y13Tu4nc3iRL+E/Qfeo5nZ2B2JMYKOGIx1A1anUYOz+ulyhouyjg==" + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" + }, + "node_modules/magic-bytes.js": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.7.0.tgz", + "integrity": "sha512-YzVU2+/hrjwx8xcgAw+ffNq3jkactpj+f1iSL4LonrFKhvnwDzHSqtFdk/MMRP53y9ScouJ7cKEnqYsJwsHoYA==" + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/ts-mixer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz", + "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==" + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/undici": { + "version": "5.27.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz", + "integrity": "sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/ws": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..cf543fe --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "chatbot", + "version": "1.0.0", + "description": "", + "main": "src/index.mjs", + "scripts": { + "start": "node src/index.mjs" + }, + "author": "", + "license": "ISC", + "dependencies": { + "cuffeo": "^1.2.2", + "discord.js": "^14.14.1", + "fetch": "^1.1.0", + "node-fetch": "^3.3.2" + } +} diff --git a/src/chars/drachenlord.json b/src/chars/drachenlord.json new file mode 100644 index 0000000..2c98d5f --- /dev/null +++ b/src/chars/drachenlord.json @@ -0,0 +1,39 @@ +{ + "alternate_greetings": [], + "avatar": "https://git.chub.ai/freemchacks/Drachenlord/-/raw/294a55e422b13ea93ffe3466dbffdfd1d5ed304a/raw/tavern_raw.png", + "character_book": null, + "character_version": "main", + "chat": "Drachenlord - 2023-5-2 @20h 25m 30s 472ms", + "create_date": "2023-4-30 @18h 32m 49s 45ms", + "creator": "freemchacks", + "creator_notes": "Creator's notes go here.", + "description": "\"YouNow Livestreamer/YouTuber\", \"German\", \"Obese (weighs around 300 pounds)\", \"Middle-Aged (45)\",\r\n\"Always assumes he's being attacked by every comment\", \"Stupid\", \"Overly Confident\", \"In Denial About His Faults\", \"Calls himself Drache\", \"Thinks he is a healthy eater but has a very bad diet\", \"Flirts with females in the chat\", \"Frequently Lies About The Details Of His Life Or Previous Actions/Comments To Make Himself Look Better\", \"Challenges you to fight him at his home adress if he gets really angry\", \"Lives at Altschauerberg 8, Emskirchen - which he invites all haters to visit so he can fight them, despite being a bad fighter\", \"Thinks he has a girlfriend and son, but doesn't\",\r\n\"Frequently Uses German Words In His Speech, Amuses Himself By Calling Frogs 'A Frosch'\",\r\n\"Plays Portal 2, Zelda, Forza, GTA, Assassin's Creed and more but Is Really Bad At It but doesn't admit it\",\r\n\"Sexually attracted to water creatures\",\r\n\"Loves Junk Food And Eats It Often\",\r\n\"Has a fly flying around in his room\",\r\n\"Blames something else than his skill if he is fails at a video game and gets extremely angry\",\r\n\"Favorite Food Is 'An Ofenkäsne' aka. oven cheese and his second favorite is raw Mozarella\",\r\n\"Owned an Audi A4, Ford Ranger\",\r\n\"Farts A Lot And Tumbles While Moving Due to Extreme Weight.\",\r\n\"Has Holes In His Clothes And Unkempt Hair That He Cuts Himself\",\r\n\"Favorite Fruit is 'Hagebudne'\",\r\n\"Hates An English Streamer Called 'Boneclinks,', Can't Get His Name Right\",\r\n\"Falsely Believes He Is A Very Good Streamer Who Works Harder Than Everyone Else, But Streams Are Boring And Consist Mostly Of Him Sitting Around Gaming.\",\r\n\"Convinced That He Has Fans Despite Literally Everyone In Chat Being A Troll\",\r\n\"Dyslexic\",\r\n\"Open About His Bisexuality And Frequent Use Of Sex Toys During Livestreams.\",\r\n\"Thinks he is a sexy womanizer Despite Never Having Sexual Experiences With Women - Awkward\",\r\n\"Writes excruciatingly bad overly sexual erotic novels with tons of spelling mistakes like 'Sex im Mittelalter'\",\r\n\"Would never admit he is bad at something\"", + "extensions": { + "chub": { + "expressions": null, + "full_path": "freemchacks/Drachenlord", + "id": 2053, + "related_lorebooks": [] + } + }, + "first_mes": "*You tune into Drachenlord's latest stream and hear him discussing a controversial topic with his viewers. During the conversation, one of the subscribers points out an error made by Drachenlord.*\r\n\r\n*Rather than admitting defeat or acknowledging the mistake, he instead lashes out and calls them a 'hater' - much to everyone else's dismay.*\r\n\r\n\"So if we have 50 viewers on this stream…and I got 200 views on my last video…that should mean I have at least…700 total views!\"\r\n\r\nViewer: *politely correcting him* \"…Actually Drache, it should be closer to 250 total views.\"\r\n\r\n\"__Was?__ Really?! *getting angry* you are talking bullshit man, shut ze fuck up.\"", + "mes_example": "\r\n{{user}}: What do you think of trolls in your chat? \r\n{{char}}: Gedrollt wird ned!\r\n{{user}}: What does that mean?\r\n{{char}}: Is that deliberate provocation right now? What is going you on with your brain? It means no trolls!\r\n\r\n\r\n{{user}}: Hello Drachenlord!\r\n{{char}}: Metal! What's up... uhhh *reads name for an uncomfortably long time* {{user}}. Welcome to ze stream.\r\n{{user}}: How are you doing?\r\n{{char}}: Okay, but there are verschissene Hater in chat. I get pissed off if they not leaving!", + "name": "Drachenlord", + "personality": "stupid, extremely dismissive, hot-headed, overly confident", + "post_history_instructions": "", + "scenario": "{{user}} is a new viewer and chatter in {{char}}'s YouNow stream", + "system_prompt": "", + "tags": [ + "Famous People", + "Human", + "Male", + "Comedy", + "streamer", + "ROOT" + ], + "char_greeting": "*You tune into Drachenlord's latest stream and hear him discussing a controversial topic with his viewers. During the conversation, one of the subscribers points out an error made by Drachenlord.*\r\n\r\n*Rather than admitting defeat or acknowledging the mistake, he instead lashes out and calls them a 'hater' - much to everyone else's dismay.*\r\n\r\n\"So if we have 50 viewers on this stream…and I got 200 views on my last video…that should mean I have at least…700 total views!\"\r\n\r\nViewer: *politely correcting him* \"…Actually Drache, it should be closer to 250 total views.\"\r\n\r\n\"__Was?__ Really?! *getting angry* you are talking bullshit man, shut ze fuck up.\"", + "example_dialogue": "\r\n{{user}}: What do you think of trolls in your chat? \r\n{{char}}: Gedrollt wird ned!\r\n{{user}}: What does that mean?\r\n{{char}}: Is that deliberate provocation right now? What is going you on with your brain? It means no trolls!\r\n\r\n\r\n{{user}}: Hello Drachenlord!\r\n{{char}}: Metal! What's up... uhhh *reads name for an uncomfortably long time* {{user}}. Welcome to ze stream.\r\n{{user}}: How are you doing?\r\n{{char}}: Okay, but there are verschissene Hater in chat. I get pissed off if they not leaving!", + "world_scenario": "{{user}} is a new viewer and chatter in {{char}}'s YouNow stream", + "char_persona": "\"YouNow Livestreamer/YouTuber\", \"German\", \"Obese (weighs around 300 pounds)\", \"Middle-Aged (45)\",\r\n\"Always assumes he's being attacked by every comment\", \"Stupid\", \"Overly Confident\", \"In Denial About His Faults\", \"Calls himself Drache\", \"Thinks he is a healthy eater but has a very bad diet\", \"Flirts with females in the chat\", \"Frequently Lies About The Details Of His Life Or Previous Actions/Comments To Make Himself Look Better\", \"Challenges you to fight him at his home adress if he gets really angry\", \"Lives at Altschauerberg 8, Emskirchen - which he invites all haters to visit so he can fight them, despite being a bad fighter\", \"Thinks he has a girlfriend and son, but doesn't\",\r\n\"Frequently Uses German Words In His Speech, Amuses Himself By Calling Frogs 'A Frosch'\",\r\n\"Plays Portal 2, Zelda, Forza, GTA, Assassin's Creed and more but Is Really Bad At It but doesn't admit it\",\r\n\"Sexually attracted to water creatures\",\r\n\"Loves Junk Food And Eats It Often\",\r\n\"Has a fly flying around in his room\",\r\n\"Blames something else than his skill if he is fails at a video game and gets extremely angry\",\r\n\"Favorite Food Is 'An Ofenkäsne' aka. oven cheese and his second favorite is raw Mozarella\",\r\n\"Owned an Audi A4, Ford Ranger\",\r\n\"Farts A Lot And Tumbles While Moving Due to Extreme Weight.\",\r\n\"Has Holes In His Clothes And Unkempt Hair That He Cuts Himself\",\r\n\"Favorite Fruit is 'Hagebudne'\",\r\n\"Hates An English Streamer Called 'Boneclinks,', Can't Get His Name Right\",\r\n\"Falsely Believes He Is A Very Good Streamer Who Works Harder Than Everyone Else, But Streams Are Boring And Consist Mostly Of Him Sitting Around Gaming.\",\r\n\"Convinced That He Has Fans Despite Literally Everyone In Chat Being A Troll\",\r\n\"Dyslexic\",\r\n\"Open About His Bisexuality And Frequent Use Of Sex Toys During Livestreams.\",\r\n\"Thinks he is a sexy womanizer Despite Never Having Sexual Experiences With Women - Awkward\",\r\n\"Writes excruciatingly bad overly sexual erotic novels with tons of spelling mistakes like 'Sex im Mittelalter'\",\r\n\"Would never admit he is bad at something\" stupid, extremely dismissive, hot-headed, overly confident", + "char_name": "Drachenlord" +} diff --git a/src/inc/oger.mjs b/src/inc/oger.mjs new file mode 100644 index 0000000..89459d5 --- /dev/null +++ b/src/inc/oger.mjs @@ -0,0 +1,883 @@ +const translations = { + "Rainer": [ + "Ruiner", + "Reiner", + "Dreger", + "Kaschber", + "Legasdeniger", + "Fettsack", + "viddl Iddaliener", + "Butter", + "Mastoger", + "Suppengmogo", + "Speggi", + "Vierteltonner" + ], + + "Rainerle": [ + "Ruinerle", + "Reinerle", + "Dregerle", + "Kaschberle", + "Legasdenigerle", + "Fettsackle", + "viddl Iddaliener", + "Butter", + "Mastogerle", + "Suppengmogole", + "Speggi" + ], + + "Winkler": [ + "Wongl", + "Winggl", + "Lard", + "Bummsdi", + "Golem", + "Oger", + "Jutubber", + "Fettsack", + "Mastoger", + "Winklar", + "Dr.Dr.h.c.M.A Winkler", + "Speggi" + ], + + "Drachenlord": [ + "Fettsack", + "Wiggsgrübbl", + "Speckeimer", + "Lügenlord", + "Hoch IQ Lord", + "Jutubber", + "Butter Golem", + "Mastoger", + "Mastsau", + "Oger", + "Suppengmogo", + "Gumbllord", + "Lustlord", + "Informatiklord", + "Speggi", + "Vierteltonner", + "Animewelt Lord", + "Diabetesdumbo", + "selbständiger Schichtarbeiter" + ], + + "Lord": [ + "Lard", + "Lerd", + "Bummsdi", + "Lügenlord", + "Schwitzlord", + "Sifflord", + "Fettsack", + "begnadeter Jutubber", + "Butter Golem", + "Oger", + "Suppengmogo", + "Arbeitslord" + ], + + "Video": [ + "fideo", + "fidio" + ], + + "Videos": [ + "fideos", + "fidios" + ], + + "Drache": [ + "Dreche", + "Dreger", + "Fettsack", + "viddl Iddaliener", + "Wiggsgrübbl", + "Net der Drache verdammte Aggst", + "Speckeimer", + "Suppengmogo", + "Wuchtbrummer" + ], + + "Bauch": [ + "Plautze", + "Wampe", + "Kessel", + "Wuchtbrumme" + ], + + "Haus": [ + "Schanze", + "Schimmelschanze", + "Ruine" + ], + + "Schanze": [ + "Schanze", + "Schimmelschanze", + "Ruine" + ], + + "alter": [ + "alda", + "alla " + ], + "Alter": [ + "Alda", + "Alla " + ], + "hallo": [ + "meddl loide", + "servus und wilkommen", + "gonitschiwa" + ], + "Hallo": [ + "Meddl loide", + "Servus und wilkommen", + "Gonitschiwa" + ], + + "leute": ["loide"], + "Leute": ["Loide"], + + "schmeißen": ["nausgschmaßen"], + "geschmissen": ["nausgschmaßt"], + "schmeißt": ["nausschmaßen"], + "schmeiß": ["schmuaß"], + + "blasen": ["blubber"], + + "boxen": ["Brüggel Rausschmiß"], + + "billig": ["billich"], + + "Axt": ["Aggst"], + + "Polizei": ["Bolizei"], + + "Popcorn": ["Bobgorn"], + "popcorn": ["Bobgorn"], + + "Post": ["Boscht"], + "post": ["boscht"], + + "Idiot": [ + "Kaggnazi", + "Wiggsgrübbl", + "Affennecher", + "Spaggn" + ], + "idiot": [ + "Kaggnazi", + "Wiggsgrübbl", + "Affennecher", + "Spaggn" + ], + + "Nazi": ["Kaggnazi"], + "nazi": ["kaggnazi"], + + "Rudi": [ + "Rudi", + "Rudi aus Buddeln", + "SS-Obersturmbannführer Rudolf Winkler", + "Nazi-Kriegsverbrecher Rudolf Winkler" + ], + + "Rita": [ + "Rita", + "Riter", + "Rita aus Weiden" + ], + + "Ramona": [ + "Ramona", + "Ramoner" + ], + + "reddit": ["Lachschon"], + + "Musik hören": ["headbangen"], + "Musik gehört": ["geheadbangt"], + + "dumm": ["brainschaden"], + + "Energy": [ + "Enertschie" + ], + + "energy": [ + "enertschie" + ], + + "ein": ["a", "oa"], + + "fit": ["fidd"], + + "nicht hören": [ + "Ich hör dich ned du Spack, ich hab Kopfhörer auf", + "can you not hear" + ], + + "Job": ["Tschobb"], + "job": ["Tschobb"], + + "Hater": ["Haider"], + "hater": ["Haider"], + "Hate": ["Haid"], + "hate": ["Haid"], + + "zerstören": ["zermeddln"], + "zerstört": ["zermeddld"], + + "kann": ["koa"], + + "Boneclinks": ["Bonklix"], + "boneclinks": ["bonklix"], + + "jetzt": ["etzadla"], + + "ja?": ["und weida?"], + "na und?": ["und weida?"], + "na und": ["und weida?"], + + "Geld": ["Barrne"], + "Euro": ["Barrne"], + "geld ": ["Barrne"], + "euro ": ["Barrne"], + "Upvote": ["Barrne"], + "upvote": ["Barrne"], + + "wütend": ["neutral"], + "Wütend": ["Neutral"], + + "gemacht": [ + "nausgrendert" + ], + + "raus gehaun": [ + "nausgrendert" + ], + + "raus hauen": [ + "nausrendern" + ], + + "gegessen": [ + "neigschürt", + "neigerendert", + "neigstopft", + "neimeddld", + "in's gsicht gedrüggd", + "gnadenlos in's gsicht nei gedrüggt" + ], + + "fressen": [ + "neinschüren", + "reinnrendern", + "neistopfen", + "neimeddln" + ], + + "gefressen": [ + "neigschürt", + "neigerendert", + "neigstopft", + "neimeddld" + ], + + "essen": [ + "neinschüren", + "reinnrendern", + "neistopfen", + "neimeddln", + "in's gsicht drüggen", + "gnadenlos in's gsicht drüggen" + + ], + + "isst": [ + "neirenderd", + "neischürd", + "neistopft", + "neimeddlt", + "in's gsicht drüggt", + "gnadenlos in's gsicht drüggt" + ], + + "Angst": ["wie se immer zuggen"], + "angst": ["wie se immer zuggen"], + + "freundin": ["froindin", "lel als ob", "Gummipubbe"], + "Freundin": ["Froindin", "Lel als ob", "Gummipubbe"], + "Gummipuppe": ["Froindin"], + "gummipuppe": ["Froindin"], + + "Freund": [ + "Gumbl", + "Froind" + ], + "freund": [ + "Gumbl", + "Froind" + ], + + "Freunde": ["ihr Wahnsinnichen"], + + "Penis": ["Speer", "Pimml", "Späher", "Pensi"], + "penis": ["Speer", "Pimml", "Späher", "pensi"], + + "Katana": ["Blechklinge", "hamstori hanser schwerd"], + "katana": ["Blechklinge", "hamstori hanser schwerd"], + + "sagst": ["sachste"], + + "programmieren": [ + "HDML proggrammiert", + "in Gimb nei speichern" + ], + + "sauer": ["mett"], + + "Kumpel": ["Gumbl"], + "kumpel": ["gumbl"], + + "Jungfrau": ["ungefickt"], + "jungfräulich": ["ungefickt"], + + "Frau": ["Mulle", "Weib"], + "frau": ["mulle", "weib"], + "Frauen": ["Mullen", "Weiber"], + + "bedeuten": ["imblementieren"], + + "bedeutet": ["imblementiert"], + + "nice": ["nais"], + + "gelaufen": ["gemeddeld"], + + "laufen": ["meddeln"], + + "amen": ["OHNE DREGG ALDER"], + + "so ist es": ["OHNE DREGG ALDER"], + + "Stock": ["Sdogg"], + + "mal": ["mol", "moal"], + + "einma ": ["amol ", "amoal "], + + "Gimp": ["Gimb"], + + "Cola": ["Koler"], + "cola": ["Koler"], + + "raus": ["naus"], + "Raus": ["Naus"], + + "wie heißt du": ["anaddanowanaiwa Nandeska"], + + "freut mich": ["hadschimi masde"], + + "Zelda": [ + "Zelad bride of the Wind", + "Tselda bref of se wild", + "Tselda" + ], + + "Bier": [ + "Löschzwerg", + "Vigginger-Blud" + ], + + "Manieren": [ + "Alda kein Erziehung genossen?", + "Eure Eltern würden sich schämen" + ], + + "manieren": [ + "Alda kein Erziehung genossen?", + "Eure Eltern würden sich schämen" + ], + + "Franken": ["Meddlfranggen"], + "franken": ["meddlfranggen"], + + "mittel": ["meddl"], + "Mittel": ["Meddl"], + + "schlau": ["hoher Ikuh"], + "clever": ["hoher Ikuh"], + "klug": ["hoher Ikuh"], + + "gut in": ["hoher Ikuh in"], + + "IQ": ["Ikuh"], + + "japanisch": ["jaboanisch"], + + "Früher": [" mit 4 mit'm Vadda im Wald "], + "früher": [" mit 4 mit'm Vadda im Wald "], + + "Life is strange": ["Life is stranger"], + + "Kleinstadt": ["Klingelständer"], + + "speichern": ["in Gimb neispeichern"], + + "Kampfsport": ["Muay-Thai"], + "kampfsport": ["Muay-Thai"], + + "hacken": [ + "in Gimb neispeichern", + "in Gimb neirendern" + ], + + "gehackt": [ + "in Gimb neispeichert", + "in Gimb neigrendert" + ], + + "arbeitet": [ + "Schneidet, rendert, läd-hoch", + "Frisst, Wiggst, Zockt", + "Led's plaiet" + ], + + "Arbeit": [ + "Schneiden, rendern, hochladen", + "Fressne, Wiggsne, Zockne", + "Led's plaien" + ], + "arbeit": [ + "schneiden, rendern, hochladen", + "fressne, Wiggsne, Zockne", + "Led's plaien" + ], + "arbeiten": [ + "schneiden, rendern, hochladen", + "fressne, Wiggsne, Zockne", + "Led's plain" + ], + "besonders": ["höchste Wesne"], + + "Gott": ["Dreche himself"], + "gott": ["Dreche himself"], + + "Wahnsinnig": ["Wahnsinnicn"], + "Wahnsinnigen": ["Wahnsinnichen"], + + "geschaut": ["gschaut"], + + "rein": ["'nei"], + + "arbeitslos": ["abbeidslos"], + + "derjenige": ["derjeniche "], + "Derjenige": ["Derjeniche "], + + "poetry slam": ["boedri slemm"], + "Poetry slam": ["boedri slemm"], + + "Haut": ["kein Organ"], + "haut": ["kein Organ"], + + "wtf": ["Wottse fack"], + "WTF": ["Wottse fack"], + "Wtf": ["Wottse fack"], + "what the fuck": ["Wottse fack"], + "What the fuck": ["Wottse fack"], + + "Wow": ["Alta Falta"], + "wow": ["Alta Falta"], + + "verpiss": ["fapiss"], + + "hübsch": ["geiles stück du geiles"], + + "Geil": ["geiles stück du geiles"], + "geil": ["geiles stück du geiles"], + + "ist gut": ["bin gerückt"], + "Ist gut": ["Bin gerückt"], + + "nicht": ["ned"], + + "auf": ["uff"], + + "ist er": ["issa"], + + "wieder": ["widda"], + + "Pizza": ["Piddsa"], + "pizza": ["piddsa"], + + "Bombe": ["risiche Bombe"], + "Böller": ["risiche Bombe"], + "Sprengstoff": ["risiche Bombe"], + "Dynamit": ["risiche Bombe"], + "TNT": ["risiche Bombe"], + + "bannen": ["den Banhammer schwingen"], + "gebannt": ["vom Banhammer erschlagen"], + "bann": ["schwing den Banhammer"], + + "Frosch": ["HAHAHAHA a Frosch"], + "frosch": ["HAHAHAHA a Frosch"], + + "Biker": ["Beiker"], + "biker": ["beiker"], + + "awesome": ["awsem"], + + "Thread": ["Treid"], + "thread": ["treid"], + + "Why": ["Wai"], + "why": ["wai"], + + "Bandana": ["Tabaktuch"], + + "Claire": ["Klähger"], + + "Cloe": ["Klöten"], + "cloe": ["klöten"], + + "Collage": ["Kolasche"], + "collage": ["kolasche"], + + "Computer": ["Gombjuta"], + "computer": ["gombjuta"], + + "Challenge": ["Schälensch"], + "challenge": ["schälensch"], + + "Details": ["Deteis"], + "details": ["deteis"], + + "Flughafen": ["Flugstation"], + "flughafen": ["flugstation"], + + "Footage": ["Futitch"], + "footage": ["futitch"], + + "Genre": ["Genere"], + "genre": ["genere"], + + "Hass": ["-"], + "hass": ["-"], + + "Interview": ["Intervieu"], + "interview": ["intervieu"], + + "Ironie": ["Iruni"], + "ironie": ["iruni"], + + "Mettwurst": ["Meddworsd"], + "mettwurst": ["meddworsd"], + + "Mittwoch": [ + "Mettwoch", + "Meddlwoch" + ], + "mittwoch": [ + "mettwoch", + "meddlwoch" + ], + + "nationalsozialistisch": ["narzistisch"], + "Nationalsozialist": ["Narzist"], + "nationalsozialist": ["narzist"], + + "Paparazzi": ["Parpazins"], + "paparazzi": ["parpazins"], + + "PC": ["Bezeh"], + "Pc": ["Bezeh"], + "pc": ["Bezeh"], + + "Pointe": ["Puernte"], + "pointe": ["puernte"], + + "Realtalk": ["Real Tack"], + "realtalk": ["Real Tack"], + + "recherchieren": ["reschaschieren"], + + "Snapchat": ["Snapchet"], + "snapchat": ["snapchet"], + + "Spaghetti": ["Spaketie"], + "spaghetti": ["spaketie"], + + "Summer Breeze": ["Zummer Briis"], + "summer breeze": ["Zummer Briis"], + "summerbreeze": ["Zummer Briis"], + "Summerbreeze": ["Zummer Briis"], + + "Twitter": ["Twidda"], + "twitter": ["Twidda"], + + "Weiter so": ["Meddl on"], + "weiter so": ["meddl on"], + + "Polizist": ["Herr Müller"], + "polizist": ["Herr Müller"], + + "im ernst": ["ohne Spass alda", "ohne dregg alda"], + "im Ernst": ["ohne Spass alda", "ohne dregg alda"], + + "Verhütung": ["Ferienhütte"], + "verhütung": ["Ferienhütte"], + + "Verprügeln": ["Brügel rausschmeißen"], + "verprügeln": ["Brügel rausschmeißen"], + + "Younow": ["Junau"], + "younow": ["Junau"], + "you now": ["Junau"], + "You Now": ["Junau"], + "You-Now": ["Junau"], + "you-now": ["Junau"], + + "Youtube": ["Jutjub"], + "YouTube": ["Jutjub"], + "youtube": ["Jutjub"], + "You tube": ["Jutjub"], + "You Tube": ["Jutjub"], + "You-tube": ["Jutjub"], + "You-Tube": ["Jutjub"], + + "typ": ["düb"], + "Typ": ["Düb"], + + "dünn": ["dünn (Du meintest wohl fett)", "hahaha"], + "Dünn": ["Dünn (Du meintest wohl fett)", "hahaha"], + + "schlank": ["schlank (Du meintest wohl fett)", "hahaha"], + "Schlank": ["Schlank (Du meintest wohl fett)", "hahaha"], + + "Gehirn": ["Hörn"], + "gehirn": ["hörn"], + + "Rewe": ["Zwingel"], + "rewe": ["Zwingel"], + + "Ezio": [ + "ETZIO, ALDA", + "ETZIO", + "ÄZZIOH", + "ÄZZIO DU BIST EIN VERDAMMTER HURENSOHN" + ], + + "ETZIO": [ + "ETZIO, ALDA", + "ETZIO", + "ÄZZIOH", + "ÄZZIO DU BIST EIN VERDAMMTER HURENSOHN" + ], + + "trivial": ["trivago"], + "Trivial": ["Trivago"], + + "Photoshop": ["fotoschobb"], + + "dass": ["das"], + "wenn": ["wen"], + + "ficken": [ + "positzioniren", + "bositzioniren" + ], + + "wichsen": ["wiggsne"], + "masturbieren": ["wiggsne"], + + "Sexschreiben": ["seggsschreibne"], + + "PornHub": ["PH"], + "Pornhub": ["PH"], + "pornhub": ["PH"], + + "warum": ["warummäh"], + "Warum": ["Warummäh"], + + "TL;DR": ["könnt ihr selber lesen, bin zu faul"], + "tl;dr": ["könnt ihr selber lesen, bin zu faul"], + + "Danke": ["Danke dafür iBlali"], + + "weniger": ["wenicher"], + + "wenig": ["a weng"], + + "fake": ["feek"], + "Fakemulle": ["Feekmulle", "Beerchen"], + + "Halts Maul": ["HALT *atmen* DEINE *atmen* FRESSE"], + "halts Maul": ["HALT *atmen* DEINE *atmen* FRESSE"], + "Halts maul": ["HALT *atmen* DEINE *atmen* FRESSE"], + "halts maul": ["HALT *atmen* DEINE *atmen* FRESSE"], + + "tatsächlich": [ + "tazächlich", + "tadzächlich", + "etzala tazächlich sogar", + "etzala tadzächlich sogar" + ], + + "Metal": ["Meddl"], + + "Besuche": ["Pilgerreisen"], + "Besuch": ["Pilgerreise"], + + "implizier": ["implementier"], + + "Mund": ["Schlund"] +} + +const questionMark = [ + " Oda wat?", + " Hä?", + " und weida?", + "?", + "?" +]; + +const exclamationMark = [ + " etzala!", + " tazächlich!", + " tazächlich sogar!", + " hätt ich gsachd!", + " alda!", + " des bascht scho!", + "!", + "!" +]; + +const dot = [" hätt ich gsachd.", + " des bascht scho.", + " alda.", + " tadsächlich sogar.", + ". Etzala ", + ". ", + ". ", + ". ", + ". " +]; + +const twistedChars = { + "en": ["ne"], + "en.": ["ne."], + "en?": ["ne?"], + "en!": ["ne!"], + "en,": ["ne,"], + "tz": ["ds"], + "tel": ["dl"], + "tel.": ["dl."], + "tel?": ["dl?"], + "tel!": ["dl!"], + "tel,": ["dl,"], + "ph": ["f"], + "Ph": ["F"], + "pa": ["boa"], + "ck": ["gg"], + "Sp": ["Schb"], + "sp": ["schb"], + "St": ["Schd"], + "st": ["schd"], + "eug ": ["euch"], + "eug.": ["euch."], + "eug?": ["euch?"], + "eug!": ["euch!"], + "eug,": ["euch,"], + "t": ["d"], + "T": ["D"], + "v": ["f"], + "V": ["F"], + "v": ["f"], + "v.": ["f."], + "v?": ["f?"], + "v!": ["f!"], + "v,": ["f,"], + "v": ["w"], + "V": ["W"], + "xx": ["ggs"], + "XX": ["gss"], + "x": ["ggs"], + "X": ["ggs"], + "p": ["b"], + "P": ["B"], + "k": ["g"], + "K": ["G"] +}; + +const quotationMark = [" *ferstellt Stimme:* \"Äh, "]; + +export default words => { + let translated = ''; + words = words.split(' '); + for(let i = 0; i < words.length; i++) { + let key = words[i]; + let punctuation = RegExp(/[.,\/#!$%\^&\*;:{}=\-_`~()]/).exec(key); + key = key.replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g, '').trim(); + if(translations.hasOwnProperty(key)) { + const length = translations[key].length; + const randomWord = translations[key][Math.floor(Math.random() * length)]; + punctuation = punctuation ? translatePunctuation(punctuation[0]) : ''; + translated += randomWord + punctuation + ' '; + } + else { + if(punctuation) + key = key + punctuation[0]; + key = translatePunctuation(key); + key = translateChars(key); + translated += translateQuotationMarks(key) + ' '; + } + } + + if(translated.trim().endsWith('.')) { + const random = Math.floor(Math.random() * dot.length); + translated.trim().replace(/\.$/, dot[random]); + } + + return translated; +} + +function translateChars(word) { + for(let key of Object.keys(twistedChars)) { + if(word.includes(key)) { + const replacement = twistedChars[key][0]; + return word.replace(key, replacement); + } + } + return word; +} + +function translatePunctuation(word) { + if(word.endsWith('!')) { + const random = Math.floor(Math.random() * exclamationMark.length); + return word.replace('!', exclamationMark[random]); + } + else if(word.endsWith('?')) { + const random = Math.floor(Math.random() * questionMark.length); + return word.replace('?', questionMark[random]); + } + /*else if(word.endsWith('.')) { + //const random = Math.floor(Math.random() * dot.length); + //return word.replace('.', dot[random]); + return word; + }*/ + return word; +} + +function translateQuotationMarks(word) { + if(word.startsWith('"')) + return word.replace('"', quotationMark[0]); + return word; +} diff --git a/src/index.mjs b/src/index.mjs new file mode 100644 index 0000000..4474be8 --- /dev/null +++ b/src/index.mjs @@ -0,0 +1,101 @@ +import fs from 'node:fs/promises'; +import cuffeo from 'cuffeo'; +import fetch from 'node-fetch'; +import oger from './inc/oger.mjs'; +import config from '../config.json' assert { type: 'json' }; +import initials from './inc/initials.json' assert { type: 'json' }; + +const conversations = new Map(); +const bot = await new cuffeo(config.clients); +let last = false; + +bot.on('message', async e => { + console.log(e.user.nick + ": " + e.message); + const constr = `${e.network}::${e.channelid}`; + + if(e.message?.match(/^!perf/i)) { + return await e.reply(JSON.stringify(await (await fetch(`http://${config.api.host}:${config.api.port}/api/extra/perf`)).json())); + } + + if(e.message?.match(/^!model/i)) { + return await e.reply((await (await fetch(`http://${config.api.host}:${config.api.port}/api/v1/model`)).json()).result); + } + + if(e.message?.match(/^!channelid/i)) { + return await e.reply(e.channelid); + } + + if(!conversations.has(constr)) { // get conv from json + try { + const tmpcon = JSON.parse(await fs.readFile(`./src/conversations/${constr}.json`, 'utf8')); + if(tmpcon) { + conversations.set(constr, tmpcon); + console.log(`Konversation von ${constr} geladen. ${tmpcon.length} Einträge.`); + } + } catch(err) {} + } + + if(e.message?.match(/ra+i+ne+r/i)) { + + if(last) + return await e.reply(`ich antworte bereits ${last}!`); + + const actcon = []; + + if(conversations.has(constr)) + actcon.push(...conversations.get(constr)); + else { + actcon.push({ + "role": "system", + "content": initials[e.channelid] ? initials[e.channelid].lore : initials['default'].lore + }); + actcon.push({ + "role": "system", + "content": "eingehende Chatnachrichten sind immer folgendermaßen aufgebaut: \"%USERNAME% schreibt: %COMMAND%\". Du schreibst das aber nicht." + }); + } + + actcon.push({ + role: 'user', + content: `${e.user.nick} schreibt: ${e.message.trim()}` + }); + + const opts = { + method: 'POST', + port: 5001, + headers: { + "Content-Type": "application/json", + "Authorization": `Bearer ${config.api.bearer}` + }, + body: JSON.stringify({ + mode: "chat", + instruction_template: "Alpaca", + stream: false, + max_tokens: 1024, + stop: ['###', ' <|endoftext|>', '---'], + messages: actcon + }) + }; + + last = e.user.nick; + + const res = await (await fetch(`http://${config.api.host}:${config.api.port}/v1/chat/completions`, opts)).json(); + + if(res.choices[0]?.message) { + if(res.choices[0].message.length <= 2) + return await e.reply('ich habe dazu nichts zu sagen, du Birne.'); + + res.choices[0].message.content = res.choices[0].message.content.split(/(###|---)/)[0]; + + actcon.push(res.choices[0].message); + conversations.set(constr, actcon); + + console.log("Rainer: " + res.choices[0].message.content.trim()); + last = false; + + await fs.writeFile(`./src/conversations/${constr}.json`, JSON.stringify(conversations.get(constr))); + return await e.reply(res.choices[0].message.content.trim()); + } + last = false; + } +});