Update some strings and cleanup unused commands

This commit is contained in:
Lucas Gabriel 2025-04-29 16:11:48 -03:00
parent 9cebaad36f
commit 4756e202be
No known key found for this signature in database
GPG Key ID: D9B075FC6DC93985
4 changed files with 3 additions and 67 deletions

View File

@ -1,28 +0,0 @@
// const Resources = require('../props/resources.json');
// const { getStrings } = require('../plugins/checkLang.js');
// const { isOnSpamWatch } = require('../spamwatch/spamwatch.js');
// const spamwatchMiddleware = require('../spamwatch/Middleware.js')(isOnSpamWatch);
// const escape = require('markdown-escape');
// const axios = require('axios');
// module.exports = (bot) => {
// bot.command("quote", spamwatchMiddleware, async (ctx) => {
// const Strings = getStrings(ctx.from.language_code);
// try {
// const response = await axios.get(Resources.quoteApi);
// const data = response.data;
// ctx.reply(escape(`${escape(Strings.quoteResult)}\n> *${escape(data.quote)}*\n_${escape(data.author)}_`), {
// reply_to_message_id: ctx.message.message_id,
// parse_mode: 'Markdown'
// });
// } catch (error) {
// console.error(error);
// ctx.reply(Strings.quoteErr, {
// reply_to_message_id: ctx.message.id,
// parse_mode: 'MarkdownV2'
// });
// };
// });
// };

View File

@ -1,36 +0,0 @@
// const axios = require("axios");
// function capitalizeFirstLetter(string) {
// return string.charAt(0).toUpperCase() + string.slice(1);
// }
// function mediaWikiToMarkdown(input) {
// input = input.replace(/===(.*?)===/g, '*$1*');
// input = input.replace(/==(.*?)==/g, '*$1*');
// input = input.replace(/=(.*?)=/g, '*$1*');
// input = input.replace(/'''(.*?)'''/g, '**$1**');
// input = input.replace(/''(.*?)''/g, '_$1_');
// input = input.replace(/^\*\s/gm, '- ');
// input = input.replace(/^\#\s/gm, '1. ');
// input = input.replace(/{{Quote(.*?)}}/g, "```\n$1```\n");
// input = input.replace(/\[\[(.*?)\|?(.*?)\]\]/g, (_, link, text) => {
// const sanitizedLink = link.replace(/ /g, '_');
// return text ? `[${text}](${sanitizedLink})` : `[${sanitizedLink}](${sanitizedLink})`;
// });
// input = input.replace(/\[\[File:(.*?)\|.*?\]\]/g, '![$1](https://en.wikipedia.org/wiki/File:$1)');
// return input;
// }
// module.exports = (bot) => {
// bot.command("wiki", async (ctx) => {
// const userInput = capitalizeFirstLetter(ctx.message.text.split(' ')[1]);
// const apiUrl = `https://en.wikipedia.org/w/index.php?title=${userInput}&action=raw`;
// const response = await axios(apiUrl, { headers: { 'Accept': "text/plain" } });
// const convertedResponse = response.data.replace(/<\/?div>/g, "").replace(/{{Infobox.*?}}/s, "");
// const result = mediaWikiToMarkdown(convertedResponse).slice(0, 2048);
// ctx.reply(result, { parse_mode: 'Markdown', disable_web_page_preview: true, reply_to_message_id: ctx.message.message_id });
// });
// };

View File

@ -1,6 +1,6 @@
{
"botWelcome": "*Hello! I'm {botName}!*\nI was made with love by some nerds who really love programming!\n\n*By using {botName}, you affirm that you have read to and agree with the privacy policy (/privacy). This helps you understand where your data goes when using this bot.*\n\nAlso, you can use /help to see the bot commands!",
"botHelp": "*Hey, I'm {botName}, a simple bot made entirely from scratch in Telegraf and Node.js by some nerds who really love programming.*\n\nClick on the buttons below to see which commands you can use!\n",
"botHelp": "*Hey, I'm {botName}, a simple bot made entirely from scratch in Telegraf and Node.js by some nerds who really love programming.*\n\nCheck out the source code: [Click here to go to GitHub]({sourceLink})\n\nClick on the buttons below to see which commands you can use!\n",
"botPrivacy": "Check out [this link]({botPrivacy}) to read the bot's privacy policy.",
"botAbout": "*About the bot*\n\nThe bot base was originally created by [Lucas Gabriel (lucmsilva)](https://github.com/lucmsilva651), now maintained by several people.\n\nThe bot's purpose is to bring fun to your groups here on Telegram in a relaxed and simple way. The bot also features some very useful commands, which you can see using the help command (/help).\n\nSpecial thanks to @givfnz2 for his many contributions to the bot!\n\nSee the source code: [Click here to go to GitHub]({sourceLink})",
"aboutBot": "About the bot",
@ -14,7 +14,7 @@
"varUnknown": "Unknown",
"varBack": "Back"
},
"unexpectedErr": "Some unexpected error occurred during a bot action. Please report it to the developers.",
"unexpectedErr": "Some unexpected error occurred during a bot action. Please report it to the developers.\n\n{error}",
"errInvalidOption": "Whoops! Invalid option!",
"kickingMyself": "*Since you don't need me, I'll leave.*",
"kickingMyselfErr": "Error leaving the chat.",

View File

@ -1,5 +1,5 @@
{
"botWelcome": "*Olá! Eu sou o {botName}!*\n\n*Ao usar o {botName}, você afirma que leu e concorda com a política de privacidade (/privacy). Isso ajuda você a entender onde seus dados vão ao usar este bot.*\n\nAlém disso, você pode usar /help para ver os meus comandos!",
"botWelcome": "*Olá! Eu sou o {botName}!*\nEu fui feito com amor por uns nerds que amam programação!\n\n*Ao usar o {botName}, você afirma que leu e concorda com a política de privacidade (/privacy). Isso ajuda você a entender onde seus dados vão ao usar este bot.*\n\nAlém disso, você pode usar /help para ver os meus comandos!",
"botHelp": "*Oi, eu sou o {botName}, um bot simples feito do zero em Telegraf e Node.js por uns nerds que gostam de programação.*\n\nVeja o código fonte: [Clique aqui para ir ao GitHub]({sourceLink})\n\nClique nos botões abaixo para ver quais comandos você pode usar!\n",
"botPrivacy": "Acesse [este link]({botPrivacy}) para ler a política de privacidade do bot.",
"botAbout": "*Sobre o bot*\n\nA base deste bot foi feita originalmente por [Lucas Gabriel (lucmsilva)](https://github.com/lucmsilva651), agora sendo mantido por várias pessoas.\n\nA intenção do bot é trazer diversão para os seus grupos aqui no Telegram de uma maneira bem descontraida e simples. O bot também conta com alguns comandos bem úteis, que você consegue ver com o comando de ajuda (/help).\n\nAgradecimento especial ao @givfnz2 pelas suas várias contribuições ao bot!\n\nVeja o código fonte: [Clique aqui para ir ao GitHub]({sourceLink})",