Compare commits

..

29 Commits

Author SHA1 Message Date
2ca39208d9 Merge branch 'main' of https://gitlab.com/ceda_ei/Quadnite-Bot 2024-10-13 20:28:07 +05:30
7cf9689420 Copy message text for feedback instead of forwarding
Telegram's pseudo-DRM prevents bots from forwarding messages in chats
with "Restrict Saving Content"
2024-10-13 20:26:07 +05:30
1d5c29564f Merge branch 'main' of https://gitlab.com/ceda_ei/Quadnite-Bot 2024-10-04 12:22:22 +05:30
e3a5f1a67b Change rate limit config
Don't send a message and use the chat as key when possible
2024-10-02 22:39:36 +05:30
7ea30c8c71 Merge branch 'main' of https://gitlab.com/ceda_ei/Quadnite-Bot 2024-09-30 10:52:54 +05:30
cd374090f2 Merge branch 'feat/ratelimit' into 'main'
feat: add rate limiter middleware

See merge request ceda_ei/Quadnite-Bot!4
2024-09-30 05:22:36 +00:00
Sphericalkat
8274ab0980 feat: add rate limiter middleware
Signed-off-by: Sphericalkat <me@kat.bio>
2024-09-30 10:39:07 +05:30
3177a1a444 Merge branch 'main' of https://gitlab.com/ceda_ei/Quadnite-Bot 2024-09-30 10:08:02 +05:30
80a0dbd2d3 Fix crash on failing to send gif 2024-09-30 10:05:45 +05:30
04268d9e22 Merge branch 'main' of https://gitlab.com/ceda_ei/Quadnite-Bot 2024-08-09 16:34:35 +05:30
41ae943913 Remove donate link 2024-08-09 16:33:14 +05:30
579bf67576 Merge branch 'main' of https://gitlab.com/ceda_ei/Quadnite-Bot 2024-04-16 19:16:47 +05:30
bdf52331b1 Add username in feedback 2024-04-16 19:15:54 +05:30
63dbcba4d8 Merge branch 'main' of https://gitlab.com/ceda_ei/Quadnite-Bot 2024-02-06 18:17:23 +05:30
5ededd535f Fix typos 2024-02-06 18:16:42 +05:30
5c5718bc1c Merge remote-tracking branch 'quadnite/main' 2024-01-25 00:43:26 +05:30
21871c9cd6 Update telegraf to 4.15 2024-01-25 00:38:35 +05:30
c01ad5109d Update commands_list.txt 2024-01-25 00:37:34 +05:30
b91f8102a3 Merge remote-tracking branch 'quadnite/master' 2023-10-19 21:22:28 +05:30
025a664da5 Merge remote-tracking branch 'quadnite/master' 2023-10-14 23:01:00 +05:30
4c7f8f97e9 Merge remote-tracking branch 'quadnite/master' 2023-10-14 22:48:10 +05:30
83f6f5c529 Merge branch 'master' of https://gitlab.com/ceda_ei/Quadnite-Bot 2021-11-25 00:08:06 +05:30
54c06ad7d4 Merge branch 'master' of https://gitlab.com/ceda_ei/Quadnite-Bot 2021-07-18 00:59:29 +05:30
e06c85f448 Merge branch 'master' of https://gitlab.com/ceda_ei/Quadnite-Bot 2021-07-09 13:22:56 +05:30
9b41271e85 Merge branch 'master' of https://gitlab.com/ceda_ei/Quadnite-Bot 2021-06-22 19:06:52 +05:30
bbc7a7d398 Merge branch 'master' of https://gitlab.com/ceda_ei/Quadnite-Bot 2020-11-25 18:58:35 +05:30
3926f3e550 Merge branch 'master' of https://gitlab.com/ceda_ei/Quadnite-Bot 2020-11-20 21:57:17 +05:30
472c7489f9 Merge branch 'master' of https://gitlab.com/ceda_ei/Quadnite-Bot 2020-11-20 21:50:55 +05:30
77270db9b4 Alternate start text for octanite. 2019-07-17 14:52:12 +05:30
13 changed files with 226 additions and 78 deletions

View File

@@ -13,4 +13,6 @@ roleplay gifs. Once you have an instance of Ugoki (and optionally
- `export BOT_API_KEY="your-token-for-bot"`
- `export FEEDBACK_ID="chat-id-where-feedback-is-forwarded-to"`
- `export UGOKI_ROOT="https://root.of.ugoki.api/server/"`
- `export RATE_TIMEFRAME=5000 # rate limit time interval in milliseconds`
- `export RATE_LIMIT=5 # number of requests allowed in the timeframe`
- `npm start`

11
bot.js
View File

@@ -1,12 +1,19 @@
const Telegraf = require("telegraf");
const { BOT_API_KEY, FEEDBACK_ID, UGOKI_ROOT } = process.env;
const { Telegraf } = require("telegraf");
const { BOT_API_KEY, FEEDBACK_ID, UGOKI_ROOT, RATE_TIMEFRAME, RATE_LIMIT } = process.env;
const fs = require("fs").promises;
const commands = require("./commands");
const axios = require("axios");
const roleplay = require("./static/roleplay.json");
const { limit } = require("@grammyjs/ratelimiter");
const bot = new Telegraf(BOT_API_KEY);
bot.catch((err) => console.log(err));
bot.use(limit({
// default config: 1 message per 1 second
timeFrame: RATE_TIMEFRAME ?? 1000,
limit: RATE_LIMIT ?? 1,
keyGenerator: (ctx) => ctx.chat?.id.toString() ?? ctx.from?.id.toString(),
}))
const data = [
"questions",

View File

@@ -16,7 +16,7 @@ module.exports = () => (ctx) => {
} else {
if (ctx.message.reply_to_message)
if (ctx.message.reply_to_message && !ctx.message.reply_to_message.is_topic_message)
return absurdify(ctx.message.reply_to_message.text);
else
return "Need text to absurdify. Send /absurdify text or reply to a"

View File

@@ -37,7 +37,7 @@ module.exports = (words = []) => (ctx) => {
} else {
if (ctx.message.reply_to_message)
if (ctx.message.reply_to_message && !ctx.message.reply_to_message.is_topic_message)
return expand(words, ctx.message.reply_to_message.text);
else
return "Need text to expand. Send /expand text or reply to a "

View File

@@ -1,14 +1,27 @@
module.exports = (feedback_id) => (ctx) => {
module.exports = (bot, feedback_id) => (ctx) => {
const message = ctx.message.text.replace(/^[^ ]+/, "");
if (message) {
ctx.forwardMessage(feedback_id);
return "Thanks for the feedback";
const from = ctx.message.from;
let contactable = "The developer might contact you regarding your feedback.";
let message;
if (from.username) {
message = `Feedback from: @${from.username}`;
} else {
contactable = "The developer might not be able to contact you due to lack of your username.";
message = `Feedback from User ${from.id}`;
}
bot.telegram.sendMessage(feedback_id, `${message} ${ctx.message.text}`).catch(console.log);
return `Thanks for the feedback! ${contactable}`;
} else {
return "To send feedback type in /feedback followed by the feedback";
return "To send feedback type in /feedback followed by the feedback. Note that developers may contact you regarding the feedback.";
}

View File

@@ -21,7 +21,7 @@ module.exports = (bot, [ questions, kys, insults, commands_list, words, roleplay
.then(bot_user => {
const default_text = (command, text) => `Do you want to ${text} `
+ `yourself?\nIf no, reply to someone with /${command} to kill`
+ `yourself?\nIf no, reply to someone with /${command} to ${command}`
+ ` them or run /${command} username/name.\nYou can suggest `
+ `more /${command} replies using /feedback`;
@@ -55,7 +55,7 @@ module.exports = (bot, [ questions, kys, insults, commands_list, words, roleplay
"Markdown"}));
bot.command("weebify", (ctx) => ctx.reply(weebify()(ctx)));
bot.command("absurdify", (ctx) => ctx.reply(absurdify()(ctx)));
bot.command("feedback", (ctx) => ctx.reply(feedback(feedback_id)(ctx)));
bot.command("feedback", (ctx) => ctx.reply(feedback(bot, feedback_id)(ctx)));
bot.command("wiki", (ctx) => media_wiki(axios,
"https://en.wikipedia.org/w/api.php")(ctx).then(x => ctx.reply(x,
{parse_mode: "HTML"})));
@@ -64,12 +64,7 @@ module.exports = (bot, [ questions, kys, insults, commands_list, words, roleplay
{parse_mode: "HTML"})));
bot.command("info", (ctx) => ctx.reply(info()(ctx), {parse_mode: "Markdown"}));
bot.command("expand", (ctx) => ctx.reply(expand(words)(ctx)));
bot.command("start", (ctx) => ctx.reply("Hi, I am Quadnite. If you are "
+ "chatting with me in private, you are most likely doing it wrong. "
+ "Add me to a group for fun. To give feedback, use /feedback"));
bot.command("donate", (ctx) => ctx.reply("Thanks for considering to donate."
+ " To support the development and hosting of Quadnite Bot, you can "
+ "donate here: https://liberapay.com/ceda_ei/"));
bot.command("start", (ctx) => ctx.reply("Hi! I'm Octanite. Sibling of @quadnite_bot. My creator @ceda_ei created me as 'another option' to users who want the bot in their groups to have privacy mode enabled. \n\nPrivacy mode? Wut is that?\n- Well basically disabling privacy mode enables a bot to read all the messages. @quadnite_bot has that disabled. Enabling privacy mode causes the bot to not recieve messages at some times. To circumvet that, you need to append @octanite_bot to your commands or simply use @quadnite_bot. \n\n[P.S. - My creator doesn't store any messages or personal data. It's safe to use any of the two bots.]\nTo give feedback, use /feedback"));
bot.hears(/^\/?(\d*)d(\d+)(@\w+)?(\s*([-+])\s*(\d+))?$/i, dice());
function getGetGif(command) {

View File

@@ -5,7 +5,7 @@ module.exports = () => (ctx) => {
text += `Message ID: \`${msg.message_id}\`\n`;
text += `Chat ID: \`${msg.chat.id}\`\n`;
text += `User ID: \`${msg.from.id}\`\n`;
if (msg.reply_to_message) {
if (ctx.message.reply_to_message && !ctx.message.reply_to_message.is_topic_message) {
const reply = msg.reply_to_message;
text += "\n*Reply to*\n";

View File

@@ -1,6 +1,6 @@
module.exports = (random, kys, default_text, bot_text, excluded_names) => (ctx) => {
if (ctx.message.reply_to_message) {
if (ctx.message.reply_to_message && !ctx.message.reply_to_message.is_topic_message) {
const { from } = ctx.message.reply_to_message;
const name = from.username ? "@" + from.username : from.first_name;

View File

@@ -14,7 +14,7 @@ module.exports = (forms, getGif) => (ctx) => {
.match(/^((@\w+(\s+|$))*)(.*)/);
const users = message[1].trim().split(" ").filter(i => i.length);
const rtm = ctx.message.reply_to_message;
if (rtm)
if (rtm && !rtm.is_topic_message)
users.push(rtm.from.username ? "@" + rtm.from.username
: rtm.from.first_name);
const reason = message[4];
@@ -38,7 +38,7 @@ module.exports = (forms, getGif) => (ctx) => {
reply = forms.none
.replace("{}", user);
getGif()
return getGif()
.then(gif => ctx.replyWithAnimation(gif.data.url, {caption: reply}));
};

View File

@@ -44,7 +44,7 @@ module.exports = () => (ctx) => {
} else {
if (ctx.message.reply_to_message)
if (ctx.message.reply_to_message && !ctx.message.reply_to_message.is_topic_message)
return weebify(ctx.message.reply_to_message.text);
else
return "Need text to weebify. Send /weebify text or reply to a "

236
package-lock.json generated
View File

@@ -9,16 +9,33 @@
"version": "2.0.0",
"license": "GPL-3.0",
"dependencies": {
"@grammyjs/ratelimiter": "^1.2.0",
"axios": "^0.21.0",
"fluent-ffmpeg": "^2.1.2",
"form-data": "^4.0.0",
"telegraf": "^3.27.1"
"telegraf": "^4.15.3"
}
},
"node_modules/@types/node": {
"version": "10.12.26",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.26.tgz",
"integrity": "sha512-nMRqS+mL1TOnIJrL6LKJcNZPB8V3eTfRo9FQA2b5gDvrHurC8XbSA86KNe0dShlEL7ReWJv/OU9NL7Z0dnqWTg=="
"node_modules/@grammyjs/ratelimiter": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@grammyjs/ratelimiter/-/ratelimiter-1.2.0.tgz",
"integrity": "sha512-xBkH/ATJsuv5JgVYX9yQM9DNg75Qqjw+gh82lVsBn4j+d0DkxxC+kuy6WFoB96Cb6oifQfaBJL8CTikdYG4v0A=="
},
"node_modules/@telegraf/types": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@telegraf/types/-/types-6.9.1.tgz",
"integrity": "sha512-bzqwhicZq401T0e09tu8b1KvGfJObPmzKU/iKCT5V466AsAZZWQrBYQ5edbmD1VZuHLEwopoOVY5wPP4HaLtug=="
},
"node_modules/abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"dependencies": {
"event-target-shim": "^5.0.0"
},
"engines": {
"node": ">=6.5"
}
},
"node_modules/async": {
"version": "3.2.1",
@@ -38,6 +55,25 @@
"follow-redirects": "^1.14.0"
}
},
"node_modules/buffer-alloc": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
"dependencies": {
"buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0"
}
},
"node_modules/buffer-alloc-unsafe": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
},
"node_modules/buffer-fill": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
"integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ=="
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -50,9 +86,9 @@
}
},
"node_modules/debug": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dependencies": {
"ms": "2.1.2"
},
@@ -73,6 +109,14 @@
"node": ">=0.4.0"
}
},
"node_modules/event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/fluent-ffmpeg": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/fluent-ffmpeg/-/fluent-ffmpeg-2.1.2.tgz",
@@ -141,20 +185,52 @@
"node": ">= 0.6"
}
},
"node_modules/mri": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
"integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
"engines": {
"node": ">=4"
}
},
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/node-fetch": {
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz",
"integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==",
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/p-timeout": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz",
"integrity": "sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw==",
"engines": {
"node": ">=10"
}
},
"node_modules/safe-compare": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/safe-compare/-/safe-compare-1.1.4.tgz",
"integrity": "sha512-b9wZ986HHCo/HbKrRpBJb2kqXMK9CEWIE1egeEvZsYn69ay3kdfl9nG3RyOcR+jInTDf7a86WQ1d4VJX7goSSQ==",
"dependencies": {
"buffer-alloc": "^1.2.0"
}
},
"node_modules/sandwich-stream": {
@@ -166,38 +242,40 @@
}
},
"node_modules/telegraf": {
"version": "3.27.1",
"integrity": "sha512-RQUnuNAEEWcLhRap81qwGUUqAy1KcvqANnA0G3pzZqFkhMe6LrTk5lVi9tdOaF0Ud/yOx5fdx0rNPYfiB27Z+w==",
"version": "4.15.3",
"resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.15.3.tgz",
"integrity": "sha512-pm2ZQAisd0YlUvnq6xdymDfoQR++8wTalw0nfw7Tjy0va+V/0HaBLzM8kMNid8pbbt7GHTU29lEyA5CAAr8AqA==",
"dependencies": {
"@types/node": "^10.1.2",
"debug": "^4.0.1",
"node-fetch": "^2.2.0",
"sandwich-stream": "^2.0.1",
"telegram-typings": "^3.6.0"
"@telegraf/types": "^6.9.1",
"abort-controller": "^3.0.0",
"debug": "^4.3.4",
"mri": "^1.2.0",
"node-fetch": "^2.6.8",
"p-timeout": "^4.1.0",
"safe-compare": "^1.1.4",
"sandwich-stream": "^2.0.2"
},
"bin": {
"telegraf": "lib/cli.mjs"
},
"engines": {
"node": ">=6.2.0"
"node": "^12.20.0 || >=14.13.1"
}
},
"node_modules/telegram-typings": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/telegram-typings/-/telegram-typings-3.6.1.tgz",
"integrity": "sha512-njVv1EAhIZnmQVLocZEADYUyqA1WIXuVcDYlsp+mXua/XB0pxx+PKtMSPeZ/EE4wPWTw9h/hA9ASTT6yQelkiw=="
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
@@ -216,10 +294,23 @@
}
},
"dependencies": {
"@types/node": {
"version": "10.12.26",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.26.tgz",
"integrity": "sha512-nMRqS+mL1TOnIJrL6LKJcNZPB8V3eTfRo9FQA2b5gDvrHurC8XbSA86KNe0dShlEL7ReWJv/OU9NL7Z0dnqWTg=="
"@grammyjs/ratelimiter": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@grammyjs/ratelimiter/-/ratelimiter-1.2.0.tgz",
"integrity": "sha512-xBkH/ATJsuv5JgVYX9yQM9DNg75Qqjw+gh82lVsBn4j+d0DkxxC+kuy6WFoB96Cb6oifQfaBJL8CTikdYG4v0A=="
},
"@telegraf/types": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@telegraf/types/-/types-6.9.1.tgz",
"integrity": "sha512-bzqwhicZq401T0e09tu8b1KvGfJObPmzKU/iKCT5V466AsAZZWQrBYQ5edbmD1VZuHLEwopoOVY5wPP4HaLtug=="
},
"abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"requires": {
"event-target-shim": "^5.0.0"
}
},
"async": {
"version": "3.2.1",
@@ -239,6 +330,25 @@
"follow-redirects": "^1.14.0"
}
},
"buffer-alloc": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
"requires": {
"buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0"
}
},
"buffer-alloc-unsafe": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
},
"buffer-fill": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
"integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ=="
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -248,9 +358,9 @@
}
},
"debug": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"requires": {
"ms": "2.1.2"
}
@@ -260,6 +370,11 @@
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
},
"fluent-ffmpeg": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/fluent-ffmpeg/-/fluent-ffmpeg-2.1.2.tgz",
@@ -302,54 +417,71 @@
"mime-db": "1.49.0"
}
},
"mri": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
"integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node-fetch": {
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz",
"integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==",
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"p-timeout": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz",
"integrity": "sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw=="
},
"safe-compare": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/safe-compare/-/safe-compare-1.1.4.tgz",
"integrity": "sha512-b9wZ986HHCo/HbKrRpBJb2kqXMK9CEWIE1egeEvZsYn69ay3kdfl9nG3RyOcR+jInTDf7a86WQ1d4VJX7goSSQ==",
"requires": {
"buffer-alloc": "^1.2.0"
}
},
"sandwich-stream": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/sandwich-stream/-/sandwich-stream-2.0.2.tgz",
"integrity": "sha512-jLYV0DORrzY3xaz/S9ydJL6Iz7essZeAfnAavsJ+zsJGZ1MOnsS52yRjU3uF3pJa/lla7+wisp//fxOwOH8SKQ=="
},
"telegraf": {
"version": "3.27.1",
"integrity": "sha512-RQUnuNAEEWcLhRap81qwGUUqAy1KcvqANnA0G3pzZqFkhMe6LrTk5lVi9tdOaF0Ud/yOx5fdx0rNPYfiB27Z+w==",
"version": "4.15.3",
"resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.15.3.tgz",
"integrity": "sha512-pm2ZQAisd0YlUvnq6xdymDfoQR++8wTalw0nfw7Tjy0va+V/0HaBLzM8kMNid8pbbt7GHTU29lEyA5CAAr8AqA==",
"requires": {
"@types/node": "^10.1.2",
"debug": "^4.0.1",
"node-fetch": "^2.2.0",
"sandwich-stream": "^2.0.1",
"telegram-typings": "^3.6.0"
"@telegraf/types": "^6.9.1",
"abort-controller": "^3.0.0",
"debug": "^4.3.4",
"mri": "^1.2.0",
"node-fetch": "^2.6.8",
"p-timeout": "^4.1.0",
"safe-compare": "^1.1.4",
"sandwich-stream": "^2.0.2"
}
},
"telegram-typings": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/telegram-typings/-/telegram-typings-3.6.1.tgz",
"integrity": "sha512-njVv1EAhIZnmQVLocZEADYUyqA1WIXuVcDYlsp+mXua/XB0pxx+PKtMSPeZ/EE4wPWTw9h/hA9ASTT6yQelkiw=="
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"

View File

@@ -22,9 +22,10 @@
},
"homepage": "https://gitlab.com/ceda_ei/Quadnite-Bot#readme",
"dependencies": {
"@grammyjs/ratelimiter": "^1.2.0",
"axios": "^0.21.0",
"fluent-ffmpeg": "^2.1.2",
"form-data": "^4.0.0",
"telegraf": "^3.27.1"
"telegraf": "^4.15.3"
}
}

View File

@@ -54,16 +54,14 @@ twerk wag
wave wink
yes
</code>
<b>Miscallenous</b>
<b>Miscellaneous</b>
help - Need help? Go here
feedback - Send feedback, suggestion for kys, insult text
feedback - Send feedback, suggestions for kys, insult text
rate - Rate me on TGDR
<b>Dice</b>
Simply mentioning a dice in a message will send the results
<code>[num]d[sides] [modifier]</code>
<i>num</i> is the number of the dices to roll. (Optional)