anisus / mucklet-bot Goto Github PK
View Code? Open in Web Editor NEWA bot for the mucklet.com APIs.
A bot for the mucklet.com APIs.
In README.md quickstart:
node index.js --login.token=<BOT_TOKEN> cfg/config.mucklet.js
should be:
node index.js --bot.token=<BOT_TOKEN> cfg/config.mucklet.js
I have been looking into creating a bot for reading stories at a natural reading speed, but have had a hard time getting started.
$ node index.js --bot.token=(cat .token) > cfg/config.mucklet.js
Results in the following:
Starting bot failed: SyntaxError: Invalid URL: /ws
at initAsClient (/home/makyo/work/wolfery-short-story-bot/node_modules/ws/lib/websocket.js:625:13)
at new WebSocket (/home/makyo/work/wolfery-short-story-bot/node_modules/ws/lib/websocket.js:83:7)
at Api._client.ResClient.namespace.namespace [as wsFactory] (file:///home/makyo/work/wolfery-short-story-bot/modules/api/Api.js:25:38)
at connectPromise (/home/makyo/work/wolfery-short-story-bot/node_modules/resclient/lib/class/ResClient.js:260:28)
at new Promise (<anonymous>)
at ResClient.connect (/home/makyo/work/wolfery-short-story-bot/node_modules/resclient/lib/class/ResClient.js:255:59)
at Api.connect (file:///home/makyo/work/wolfery-short-story-bot/modules/api/Api.js:45:23)
at Bot._tryGetBot (file:///home/makyo/work/wolfery-short-story-bot/modules/bot/Bot.js:82:26)
at Bot.login (file:///home/makyo/work/wolfery-short-story-bot/modules/bot/Bot.js:37:8)
at file:///home/makyo/work/wolfery-short-story-bot/index.js:56:28
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
SyntaxError: Invalid URL: /ws
at initAsClient (/home/makyo/work/wolfery-short-story-bot/node_modules/ws/lib/websocket.js:625:13)
at new WebSocket (/home/makyo/work/wolfery-short-story-bot/node_modules/ws/lib/websocket.js:83:7)
at Api._client.ResClient.namespace.namespace [as wsFactory] (file:///home/makyo/work/wolfery-short-story-bot/modules/api/Api.js:25:38)
at connectPromise (/home/makyo/work/wolfery-short-story-bot/node_modules/resclient/lib/class/ResClient.js:260:28)
at new Promise (<anonymous>)
at ResClient.connect (/home/makyo/work/wolfery-short-story-bot/node_modules/resclient/lib/class/ResClient.js:255:59)
at Api.connect (file:///home/makyo/work/wolfery-short-story-bot/modules/api/Api.js:45:23)
at Bot._tryGetBot (file:///home/makyo/work/wolfery-short-story-bot/modules/bot/Bot.js:82:26)
at Bot.login (file:///home/makyo/work/wolfery-short-story-bot/modules/bot/Bot.js:37:8)
at file:///home/makyo/work/wolfery-short-story-bot/index.js:56:28
Node.js v21.6.1
The config file is still created, but running a sample command results in the following:
Loading configuration failed: SyntaxError: Unexpected identifier 'modules'
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)
at callTranslator (node:internal/modules/esm/loader:279:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)
at async link (node:internal/modules/esm/module_job:76:21)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.