Compare commits

...

7 Commits

Author SHA1 Message Date
77270db9b4 Alternate start text for octanite. 2019-07-17 14:52:12 +05:30
2914321b3c Fix typo in kys.txt 2019-03-24 23:45:22 +05:30
375f032b97 Add package-lock and catch errors 2019-03-04 14:48:26 +05:30
dcf77e56a3 Remove empty lines from questions.txt 2019-02-18 22:35:40 +05:30
e4311467b3 Fix wrong date in /info 2019-02-14 20:01:02 +05:30
bd2f38679c Add /start 2019-02-14 19:00:19 +05:30
59e8db799a Merge branch 'node_port' into 'master'
Node port

See merge request ceda_ei/Quadnite-Bot!3
2019-02-14 13:16:28 +00:00
6 changed files with 85 additions and 4 deletions

1
bot.js
View File

@@ -5,6 +5,7 @@ const commands = require("./commands");
const axios = require("axios"); const axios = require("axios");
const bot = new Telegraf(BOT_API_KEY); const bot = new Telegraf(BOT_API_KEY);
bot.catch((err) => console.log(err));
const data = [ const data = [
"questions", "questions",

View File

@@ -60,5 +60,6 @@ module.exports = (bot, [ questions, kys, insults, commands_list, words ],
"https://wiki.archlinux.org/api.php")(ctx).then(x => ctx.reply(x, "https://wiki.archlinux.org/api.php")(ctx).then(x => ctx.reply(x,
{parse_mode: "HTML"}))); {parse_mode: "HTML"})));
bot.command("info", (ctx) => ctx.reply(info()(ctx), {parse_mode: "Markdown"})); bot.command("info", (ctx) => ctx.reply(info()(ctx), {parse_mode: "Markdown"}));
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"));
}; };

View File

@@ -24,7 +24,7 @@ module.exports = () => (ctx) => {
text += "Channel ID: "; text += "Channel ID: ";
text += `\`${forward.id}\`\n`; text += `\`${forward.id}\`\n`;
text += "Message Date: `"; text += "Message Date: `";
const date = new Date(reply.forward_date); const date = new Date(reply.forward_date*1000);
text += date.toUTCString(); text += date.toUTCString();
text += "`"; text += "`";

View File

@@ -26,7 +26,7 @@
##name## You should try playing snake and ladders, with real snakes and no ladders. ##name## You should try playing snake and ladders, with real snakes and no ladders.
##name## Dance naked on a couple of HT wires. ##name## Dance naked on a couple of HT wires.
##name## An active volcano is the best swimming pool for you. ##name## An active volcano is the best swimming pool for you.
##name## You shoulf try hot bath in a volcano. ##name## You should try hot bath in a volcano.
##name## Try to spend one day in a coffin and it will be yours forever. ##name## Try to spend one day in a coffin and it will be yours forever.
##name## Hit Uranium with a slow moving neutron in your presence. It will be a worthwhile experience. ##name## Hit Uranium with a slow moving neutron in your presence. It will be a worthwhile experience.
##name## You can be the first person to step on the sun. Have a try. ##name## You can be the first person to step on the sun. Have a try.

81
package-lock.json generated Normal file
View File

@@ -0,0 +1,81 @@
{
"name": "quadnite-bot",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/node": {
"version": "10.12.26",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.26.tgz",
"integrity": "sha512-nMRqS+mL1TOnIJrL6LKJcNZPB8V3eTfRo9FQA2b5gDvrHurC8XbSA86KNe0dShlEL7ReWJv/OU9NL7Z0dnqWTg=="
},
"axios": {
"version": "0.18.0",
"requires": {
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"follow-redirects": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
"requires": {
"debug": "^3.2.6"
}
},
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"node-fetch": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz",
"integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA=="
},
"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",
"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"
},
"dependencies": {
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
}
}
},
"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=="
}
}
}

View File

@@ -1,4 +1,3 @@
name?
How old are you? How old are you?
Whats your Birthday? Whats your Birthday?
What starsign does that make it? What starsign does that make it?
@@ -1755,4 +1754,3 @@ How do you memorize your numbers?
Have you ever been stuck in a bad situation but had no phone? Have you ever been stuck in a bad situation but had no phone?
How many signal bars do you usually get in your room? How many signal bars do you usually get in your room?
What service provider do you think is the best and why so? What service provider do you think is the best and why so?