await and redis gtfo
This commit is contained in:
parent
955d13bfed
commit
e9e4b4a90d
4 changed files with 5 additions and 69 deletions
|
@ -1,4 +0,0 @@
|
|||
const Redis = require("ioredis");
|
||||
const redis = new Redis();
|
||||
|
||||
module.exports = { redis };
|
10
index.js
10
index.js
|
@ -1,11 +1,9 @@
|
|||
const { client } = require("./clients/twitch.js");
|
||||
const { redis } = require("./clients/redis.js");
|
||||
const { getCommands } = require("./utils/commands.js");
|
||||
require("./web");
|
||||
|
||||
client.on("ready", async () => {
|
||||
console.log("connected to chat");
|
||||
client
|
||||
await client
|
||||
.say(process.env.TWITCH_USERNAME, "MrDestructoid")
|
||||
.catch((err) => console.log(err));
|
||||
});
|
||||
|
@ -30,7 +28,7 @@ client.on("PRIVMSG", async (msg) => {
|
|||
if (client.commands[splitted[1]].restricted) {
|
||||
if (!msg.badges.hasBroadcaster) {
|
||||
if (!msg.isMod) {
|
||||
client.say(
|
||||
await client.say(
|
||||
msg.channelName,
|
||||
`${msg.displayName}, need to be a mod or brodcaster to use`
|
||||
);
|
||||
|
@ -47,7 +45,7 @@ client.on("PRIVMSG", async (msg) => {
|
|||
client.commands[splitted[1]].mod &&
|
||||
!client.userStateTracker.channelStates[msg.channelName].isMod
|
||||
) {
|
||||
client.say(
|
||||
await client.say(
|
||||
msg.channelName,
|
||||
`${msg.displayName}, bot needs to be a mod or brodcaster to use`
|
||||
);
|
||||
|
@ -58,7 +56,7 @@ client.on("PRIVMSG", async (msg) => {
|
|||
|
||||
await client.commands[splitted[1]].run(client, msg, splitted);
|
||||
} catch (err) {
|
||||
client
|
||||
await client
|
||||
.say(
|
||||
msg.channelName,
|
||||
`${msg.displayName}, not a command or something went wrong ${err}`
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"dank-twitch-irc": "^4.3.0",
|
||||
"express": "^4.18.2",
|
||||
"ioredis": "^5.3.0"
|
||||
"express": "^4.18.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,19 +3,13 @@ lockfileVersion: 5.4
|
|||
specifiers:
|
||||
dank-twitch-irc: ^4.3.0
|
||||
express: ^4.18.2
|
||||
ioredis: ^5.3.0
|
||||
|
||||
dependencies:
|
||||
dank-twitch-irc: 4.3.0
|
||||
express: 4.18.2
|
||||
ioredis: 5.3.0
|
||||
|
||||
packages:
|
||||
|
||||
/@ioredis/commands/1.2.0:
|
||||
resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==}
|
||||
dev: false
|
||||
|
||||
/@types/debug/4.1.7:
|
||||
resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==}
|
||||
dependencies:
|
||||
|
@ -85,11 +79,6 @@ packages:
|
|||
get-intrinsic: 1.2.0
|
||||
dev: false
|
||||
|
||||
/cluster-key-slot/1.1.2:
|
||||
resolution: {integrity: sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/content-disposition/0.5.4:
|
||||
resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==}
|
||||
engines: {node: '>= 0.6'}
|
||||
|
@ -166,11 +155,6 @@ packages:
|
|||
ms: 2.1.2
|
||||
dev: false
|
||||
|
||||
/denque/2.1.0:
|
||||
resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==}
|
||||
engines: {node: '>=0.10'}
|
||||
dev: false
|
||||
|
||||
/depd/2.0.0:
|
||||
resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
@ -328,23 +312,6 @@ packages:
|
|||
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
||||
dev: false
|
||||
|
||||
/ioredis/5.3.0:
|
||||
resolution: {integrity: sha512-Id9jKHhsILuIZpHc61QkagfVdUj2Rag5GzG1TGEvRNeM7dtTOjICgjC+tvqYxi//PuX2wjQ+Xjva2ONBuf92Pw==}
|
||||
engines: {node: '>=12.22.0'}
|
||||
dependencies:
|
||||
'@ioredis/commands': 1.2.0
|
||||
cluster-key-slot: 1.1.2
|
||||
debug: 4.3.4
|
||||
denque: 2.1.0
|
||||
lodash.defaults: 4.2.0
|
||||
lodash.isarguments: 3.1.0
|
||||
redis-errors: 1.2.0
|
||||
redis-parser: 3.0.0
|
||||
standard-as-callback: 2.1.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/ipaddr.js/1.9.1:
|
||||
resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==}
|
||||
engines: {node: '>= 0.10'}
|
||||
|
@ -354,14 +321,6 @@ packages:
|
|||
resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==}
|
||||
dev: false
|
||||
|
||||
/lodash.defaults/4.2.0:
|
||||
resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==}
|
||||
dev: false
|
||||
|
||||
/lodash.isarguments/3.1.0:
|
||||
resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==}
|
||||
dev: false
|
||||
|
||||
/lodash.pickby/4.6.0:
|
||||
resolution: {integrity: sha512-AZV+GsS/6ckvPOVQPXSiFFacKvKB4kOQu6ynt9wz0F3LO4R9Ij4K1ddYsIytDpSgLz88JHd9P+oaLeej5/Sl7Q==}
|
||||
dev: false
|
||||
|
@ -512,18 +471,6 @@ packages:
|
|||
util-deprecate: 1.0.2
|
||||
dev: false
|
||||
|
||||
/redis-errors/1.2.0:
|
||||
resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==}
|
||||
engines: {node: '>=4'}
|
||||
dev: false
|
||||
|
||||
/redis-parser/3.0.0:
|
||||
resolution: {integrity: sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==}
|
||||
engines: {node: '>=4'}
|
||||
dependencies:
|
||||
redis-errors: 1.2.0
|
||||
dev: false
|
||||
|
||||
/safe-buffer/5.2.1:
|
||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||
dev: false
|
||||
|
@ -602,10 +549,6 @@ packages:
|
|||
readable-stream: 3.6.0
|
||||
dev: false
|
||||
|
||||
/standard-as-callback/2.1.0:
|
||||
resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==}
|
||||
dev: false
|
||||
|
||||
/statuses/2.0.1:
|
||||
resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
|
Loading…
Reference in a new issue