cheesits456 / discord-ssh-bot Goto Github PK
View Code? Open in Web Editor NEWA node.js Discord bot for using shell commands remotely through Discord
License: GNU General Public License v3.0
A node.js Discord bot for using shell commands remotely through Discord
License: GNU General Public License v3.0
root@pk020311:~/discordbot# node index.js
Logged in as MinBot#4966
node:internal/errors:478
ErrorCaptureStackTrace(err);
^
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
at new NodeError (node:internal/errors:387:5)
at normalizeSpawnArguments (node:child_process:531:11)
at spawn (node:child_process:726:13)
at exec (/root/discordbot/script.js:26:12)
at Client. (/root/discordbot/script.js:47:3)
at Client.emit (node:events:513:28)
at MessageCreateAction.handle (/root/discordbot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/root/discordbot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/root/discordbot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/root/discordbot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22) {
code: 'ERR_INVALID_ARG_VALUE'
}
i wrote all things to config ,invited the bor but it dont seeem to work
root@pk020311:~/discordbot# node index.js
node:internal/modules/cjs/loader:998
throw err;
^
Error: Cannot find module 'semver'
Require stack:
you can make this bot in python, right? make plsssssss
user@cloudshell:~/discord-ssh-bot$ node index.js
SyntaxError: Unexpected token , in JSON at position 87
at JSON.parse ()
at Object. (/home/user/discord-ssh-bot/script.js:6:22)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/home/user/discord-ssh-bot/index.js:5:2)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
Originally posted by BeltoAlex April 30, 2021
Is there a way that I can allow multiple users to type commands into the channel?
Right now the other users can access the text channel and type messages into it, but the bot doesn't recognize their commands.
Could i add multiple ids to 'owner' in the config, or some new field to list their ids?
told me i needed to update node so i did, is the module supposed to be called server?
`internal/modules/cjs/loader.js:960
throw err;
^
Error: Cannot find module 'semver'
Require stack:
is there any 'cd' like command? because 'cd' doesn't change the directory when i issue the command i
Would it be possible to add a feature to cd
into a directory, and save that? Or is it out of the scope of this bot. Thanks in advance
When i run: node index.js : it gives out this
row@minecraft:~/sshish/discord-ssh-bot$ node index.js
/home/row/sshish/discord-ssh-bot/index.js:18
if (options?.terminal) await (await client.config.channel.fetchWebhooks()).first().send(input, {
^
SyntaxError: Unexpected token .
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
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.