Initial commit
commit
0065b52ac9
|
@ -0,0 +1,2 @@
|
|||
TOKENS.txt
|
||||
node_modules/
|
|
@ -0,0 +1,27 @@
|
|||
* React Bot
|
||||
|
||||
* INSTALL
|
||||
You need Node.js 17 or newer
|
||||
|
||||
#+BEGIN_SRC shell
|
||||
npm install # not recommended
|
||||
# OR
|
||||
pnpm install # highly recommended
|
||||
#+END_SRC
|
||||
|
||||
* CONFIGURATION
|
||||
Edit config.json:
|
||||
#+BEGIN_SRC json
|
||||
{
|
||||
"messageId": "Enter your message id here",
|
||||
"channelId": "Enter channel id here",
|
||||
"emoji": "Enter emoji you want to react with format: name:id or use real emoji (example: 🎉)"
|
||||
}
|
||||
#+END_SRC
|
||||
Also you have to create file called `TOKENS.txt` with your accounts separated by new line
|
||||
|
||||
* USAGE
|
||||
Start bot with command:
|
||||
#+BEGIN_SRC shell
|
||||
npm start
|
||||
#+END_SRC
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"messageId": "980778975779500102",
|
||||
"channelId": "831562194197938229",
|
||||
"emoji": "oun:980779053571252224"
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "react_bot",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "node react.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"discord-user-bots": "^1.5.2"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
lockfileVersion: 5.4
|
||||
|
||||
specifiers:
|
||||
discord-user-bots: ^1.5.2
|
||||
|
||||
dependencies:
|
||||
discord-user-bots: 1.5.2
|
||||
|
||||
packages:
|
||||
|
||||
/asynckit/0.4.0:
|
||||
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
|
||||
dev: false
|
||||
|
||||
/combined-stream/1.0.8:
|
||||
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
|
||||
engines: {node: '>= 0.8'}
|
||||
dependencies:
|
||||
delayed-stream: 1.0.0
|
||||
dev: false
|
||||
|
||||
/delayed-stream/1.0.0:
|
||||
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
dev: false
|
||||
|
||||
/discord-user-bots/1.5.2:
|
||||
resolution: {integrity: sha512-BGqpkz5HYOb3WEZ3KkfF6dpGiayse58hQZBmJ8m6aVBYdqTt8z5bKu+Ewx888sxFittLGyf7XKOZaDI4nVU8/A==}
|
||||
dependencies:
|
||||
form-data: 4.0.0
|
||||
node-fetch: 2.6.7
|
||||
ws: 8.7.0
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- encoding
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/form-data/4.0.0:
|
||||
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
|
||||
engines: {node: '>= 6'}
|
||||
dependencies:
|
||||
asynckit: 0.4.0
|
||||
combined-stream: 1.0.8
|
||||
mime-types: 2.1.35
|
||||
dev: false
|
||||
|
||||
/mime-db/1.52.0:
|
||||
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: false
|
||||
|
||||
/mime-types/2.1.35:
|
||||
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dependencies:
|
||||
mime-db: 1.52.0
|
||||
dev: false
|
||||
|
||||
/node-fetch/2.6.7:
|
||||
resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==}
|
||||
engines: {node: 4.x || >=6.0.0}
|
||||
peerDependencies:
|
||||
encoding: ^0.1.0
|
||||
peerDependenciesMeta:
|
||||
encoding:
|
||||
optional: true
|
||||
dependencies:
|
||||
whatwg-url: 5.0.0
|
||||
dev: false
|
||||
|
||||
/tr46/0.0.3:
|
||||
resolution: {integrity: sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=}
|
||||
dev: false
|
||||
|
||||
/webidl-conversions/3.0.1:
|
||||
resolution: {integrity: sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=}
|
||||
dev: false
|
||||
|
||||
/whatwg-url/5.0.0:
|
||||
resolution: {integrity: sha1-lmRU6HZUYuN2RNNib2dCzotwll0=}
|
||||
dependencies:
|
||||
tr46: 0.0.3
|
||||
webidl-conversions: 3.0.1
|
||||
dev: false
|
||||
|
||||
/ws/8.7.0:
|
||||
resolution: {integrity: sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==}
|
||||
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
|
||||
dev: false
|
|
@ -0,0 +1,16 @@
|
|||
const Discord = require("discord-user-bots");
|
||||
const fs = require("fs");
|
||||
const tokens = fs.readFileSync("./TOKENS.txt", "utf-8").split("\n");
|
||||
const clients = tokens.map((token) => new Discord.Client(token));
|
||||
const { messageId, channelId, emoji } = require("./config.json");
|
||||
|
||||
clients.forEach(
|
||||
(client) =>
|
||||
(client.on.ready = () =>
|
||||
client.add_reaction(messageId, channelId, emoji).then(async () => {
|
||||
console.log(
|
||||
`${client.user.username}#${client.user.discriminator} added reaction`
|
||||
);
|
||||
await client.close();
|
||||
}))
|
||||
);
|
Loading…
Reference in New Issue