discord.sh | line Discord webhook integration written in 100 % Bash script | Chat library
kandi X-RAY | discord.sh Summary
kandi X-RAY | discord.sh Summary
Write-only command-line integration for Discord webhooks, written in 100% Bash script. Influenced heavily by slack-cli.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of discord.sh
discord.sh Key Features
discord.sh Examples and Code Snippets
Community Discussions
Trending Discussions on discord.sh
QUESTION
I have a Discord Bot which needs sharding now. I created a file named "botlaunch.js", which I start from the console (pm2 start botlaunch.js
). In this file is all stuff you need for sharding.
Here is how my botlaunch.js
looks like:
ANSWER
Answered 2019-Mar-24 at 16:48You could use ShardingManager#broadcastEval()
if you want to obviously eval something, if you need some properties use ShardingManager#fetchClientValues()
like:
QUESTION
I'm setting up a Bot using Discord.JS and want to pass the shardArgs
option from the ShardingManager
to the ShardClient
. How do I access the option (shardArgs
) from the ShardClientUtil
?
ANSWER
Answered 2018-Dec-29 at 13:20The shardArgs
are actually passed around a bit:
- First to
Shard
's constructor - Then to
Shard#spawn
- Finally to
child_process.fork
(which will start the shard's process)
You can access your array in your shards via process.argv
. (No need for IPC)
Mind that the first entry is the exeuctable (node) and the second is the file being executed (Main.js), the third and up entries are your array's.
As an example logging process.argv
in your Main.js
file might log:
['usr/bin/node', '/home/bot/Main.js', 'shard args to be passed through']
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install discord.sh
Download (or clone) a copy of discord.sh
Point discord.sh at a webhook endpoint (see below)
Go nuts.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page