Skip to content

Commit

Permalink
Merge branch 'beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
ptkdev committed Nov 18, 2022
2 parents 52998ce + 38a91ff commit 66560d9
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 161 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# v0.6.6 (November 13, 2022)
# v0.6.7 (November 18, 2022)

- Fix: spotify button
- Fix: discord button
- Fix: minor issues and misprint in translation files

<!-- all-shields/sponsors-badges:START -->

[![Donate Paypal](https://img.shields.io/badge/donate-paypal-005EA6.svg?style=for-the-badge&logo=paypal)](https://www.paypal.me/ptkdev) [![Donate Ko-Fi](https://img.shields.io/badge/donate-ko--fi-29abe0.svg?style=for-the-badge&logo=ko-fi)](https://ko-fi.com/ptkdev) [![Donate GitHub Sponsors](https://img.shields.io/badge/donate-sponsors-ea4aaa.svg?style=for-the-badge&logo=github)](https://github.com/sponsors/ptkdev) [![Donate Patreon](https://img.shields.io/badge/donate-patreon-F87668.svg?style=for-the-badge&logo=patreon)](https://www.patreon.com/join/ptkdev) [![Donate Bitcoin](https://img.shields.io/badge/BTC-35jQmZCy4nsxoMM3QPFrnZePDVhdKaHMRH-E38B29.svg?style=flat-square&logo=bitcoin)](https://ptk.dev/img/icons/menu/bitcoin_wallet.png) [![Donate Ethereum](https://img.shields.io/badge/ETH-0x8b8171661bEb032828e82baBb0B5B98Ba8fBEBFc-4E8EE9.svg?style=flat-square&logo=ethereum)](https://ptk.dev/img/icons/menu/ethereum_wallet.png)

<!-- all-shields/sponsors-badges:END -->

# v0.6.6 (November 13, 2022)

- Fix: spotify button
- Fix: discord button

# v0.6.5 (November 13, 2022)

- New: spotify playlist
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- all-shields/header-badges:START -->

[![v0.6.6](https://img.shields.io/badge/version-v0.6.6-lightgray.svg?style=flat&logo=)](https://github.com/ptkdev/aboutmeinfo-telegram-bot/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/aboutmeinfo-telegram-bot?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/aboutmeinfo-telegram-bot) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev/aboutmeinfo-telegram-bot/blob/main/LICENSE.md) [![Language: TypeScript](https://img.shields.io/badge/language-typescript-blue.svg?style=flat&logo=typescript)](https://www.typescriptlang.org/) [![Framework: Grammy](https://img.shields.io/badge/powered%20by-grammy-009dca.svg?style=flat&logo=telegram)](https://grammy.dev/) [![ECMAScript: 2019](https://img.shields.io/badge/ES-9-F7DF1E.svg?style=flat&logo=javascript)](https://github.com/tc39/ecma262) [![Discord Server](https://discordapp.com/api/guilds/383373985666301975/embed.png)](https://discord.ptkdev.io)
[![v0.6.7-beta.1](https://img.shields.io/badge/version-v0.6.7--beta.1-lightgray.svg?style=flat&logo=)](https://github.com/ptkdev/aboutmeinfo-telegram-bot/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/aboutmeinfo-telegram-bot?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/aboutmeinfo-telegram-bot) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev/aboutmeinfo-telegram-bot/blob/main/LICENSE.md) [![Language: TypeScript](https://img.shields.io/badge/language-typescript-blue.svg?style=flat&logo=typescript)](https://www.typescriptlang.org/) [![Framework: Grammy](https://img.shields.io/badge/powered%20by-grammy-009dca.svg?style=flat&logo=telegram)](https://grammy.dev/) [![ECMAScript: 2019](https://img.shields.io/badge/ES-9-F7DF1E.svg?style=flat&logo=javascript)](https://github.com/tc39/ecma262) [![Discord Server](https://discordapp.com/api/guilds/383373985666301975/embed.png)](https://discord.ptkdev.io)

<!-- all-shields/header-badges:END -->

Expand Down
13 changes: 13 additions & 0 deletions app/functions/commands/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,44 +94,57 @@ const about = async (): Promise<void> => {
const buttons = new InlineKeyboard();

account.facebook !== "" &&
(account.facebook.startsWith("https://") || account.facebook.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_facebook"), account.facebook).row();

account.instagram !== "" &&
(account.instagram.startsWith("https://") || account.instagram.startsWith("http://")) &&
buttons
.url(translate(lang.language, "about_command_button_instagram"), account.instagram)
.row();

account.twitter !== "" &&
(account.twitter.startsWith("https://") || account.twitter.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_twitter"), account.twitter).row();

account.github !== "" &&
(account.github.startsWith("https://") || account.github.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_github"), account.github).row();

account.tiktok !== "" &&
(account.tiktok.startsWith("https://") || account.tiktok.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_tiktok"), account.tiktok).row();

account.linkedin !== "" &&
(account.linkedin.startsWith("https://") || account.linkedin.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_linkedin"), account.linkedin).row();

account.youtube !== "" &&
(account.youtube.startsWith("https://") || account.youtube.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_youtube"), account.youtube).row();

account.spotify !== "" &&
(account.spotify.startsWith("https://") || account.spotify.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_spotify"), account.spotify).row();

account.discord !== "" &&
(account.discord.startsWith("https://") || account.discord.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_discord"), account.discord).row();

account.steam !== "" &&
(account.steam.startsWith("https://") || account.steam.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_steam"), account.steam).row();

account.onlyfans !== "" &&
(account.onlyfans.startsWith("https://") || account.onlyfans.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_onlyfans"), account.onlyfans).row();

account.amazon !== "" &&
(account.amazon.startsWith("https://") || account.amazon.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_amazon"), account.amazon).row();

account.website !== "" &&
(account.website.startsWith("https://") || account.website.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_website"), account.website).row();

const options: any = {};
Expand Down
12 changes: 6 additions & 6 deletions app/functions/commands/hears.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ const hears = async (): Promise<void> => {
case "set_spotify":
text = telegram.api.message.getText(ctx).trim(); // without lower case because spotify have id CASE SENSITIVE
if (
!text.startsWith("https://") &&
!text.startsWith("http://") &&
translate(lang.language, "set_command_skip") !== text
!text.toLowerCase().startsWith("https://") &&
!text.toLowerCase().startsWith("http://") &&
translate(lang.language, "set_command_skip") !== text.toLowerCase()
) {
text = `https://open.spotify.com/playlist/${text}`;
}
Expand Down Expand Up @@ -264,9 +264,9 @@ const hears = async (): Promise<void> => {
text = telegram.api.message.getText(ctx).trim(); // without lower case because discord have id CASE SENSITIVE

if (
!text.startsWith("https://") &&
!text.startsWith("http://") &&
translate(lang.language, "set_command_skip") !== text
!text.toLowerCase().startsWith("https://") &&
!text.toLowerCase().startsWith("http://") &&
translate(lang.language, "set_command_skip") !== text.toLowerCase()
) {
text = `https://discord.com/invite/${text}`;
}
Expand Down
12 changes: 6 additions & 6 deletions app/functions/commands/ral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import translate from "@translations/translate";
import db from "@routes/api/database";

/**
* command: /version
* command: /ral
* =====================
* Get the version of the bot
* Meme command for https://t.me/ptkdev_support_italian
*
*/
const version = async (): Promise<void> => {
const ral = async (): Promise<void> => {
bot.command("ral", async (ctx) => {
logger.info("command: /ral", "version.ts:ral()");
logger.info("command: /ral", "ral.ts:ral()");
const lang = await db.settings.get({
group_id: telegram.api.message.getChatID(ctx),
});
Expand Down Expand Up @@ -46,5 +46,5 @@ const version = async (): Promise<void> => {
});
};

export { version };
export default version;
export { ral };
export default ral;
30 changes: 15 additions & 15 deletions app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,28 @@
"about_command_button_onlyfans": "🔞 Onlyfans",
"about_command_button_amazon": "🎁 Amazon",
"set_select_button": "Choose the button you want to change:",
"set_command_facebook": "Type the link or nickname of your 👮‍♂️ Facebook profile, type in \"<b>skip</b>\" if you don't have one",
"set_command_instagram": "Type the link or nickname of your 📷 Instagram profile, type in \"<b>skip</b>\" if you don't have one",
"set_command_twitter": "Type the link or nickname of your 🐣 Twitter profile, type in \"<b>skip</b>\" if you don't have one",
"set_command_linkedin": "Type the link or nickname of your 💼 LinkedIn profile, type in \"<b>skip</b>\" if you don't have one",
"set_command_youtube": "Type the link or nickname of your 📺 Youtube channel, type in \"<b>skip</b>\" if you don't have one",
"set_command_spotify": "Type the link or id of your 🎧 Spotify playlist, type in \"<b>skip</b>\" if you don't have one",
"set_command_discord": "Type the link or id of your 🤖 Discord server, type in \"<b>skip</b>\" if you don't have one",
"set_command_tiktok": "Type the link or nickname of your 👯‍♀️ TikTok profile, type in \"<b>skip</b>\" if you don't have one",
"set_command_github": "Type the link or nickname of your 👨‍💻 GitHub profile, type in \"<b>skip</b>\" if you don't have one",
"set_command_steam": "Type the link or nickname of your 🎮 Steam profile, type in \"<b>skip</b>\" if you don't have one",
"set_command_onlyfans": "Type the link or nickname of your 🔞 Onlyfans profile, type in \"<b>skip</b>\" if you don't have one",
"set_command_amazon": "Type the link or id of your wishlist 🎁 Amazon, type in \"<b>skip</b>\" if you don't have one",
"set_command_website": "Type the link or nickname of your 🌎 Personal website, type in \"<b>skip</b>\" if you don't have one",
"set_command_facebook": "Type the link or nickname of your 👮‍♂️ Facebook profile, type in <b><code>skip</code></b> if you don't have one",
"set_command_instagram": "Type the link or nickname of your 📷 Instagram profile, type in <b><code>skip</code></b> if you don't have one",
"set_command_twitter": "Type the link or nickname of your 🐣 Twitter profile, type in <b><code>skip</code></b> if you don't have one",
"set_command_linkedin": "Type the link or nickname of your 💼 LinkedIn profile, type in <b><code>skip</code></b> if you don't have one",
"set_command_youtube": "Type the link or nickname of your 📺 Youtube channel, type in <b><code>skip</code></b> if you don't have one",
"set_command_spotify": "Type the link or id of your 🎧 Spotify playlist, type in <b><code>skip</code></b> if you don't have one",
"set_command_discord": "Type the link or id of your 🤖 Discord server, type in <b><code>skip</code></b> if you don't have one",
"set_command_tiktok": "Type the link or nickname of your 👯‍♀️ TikTok profile, type in <b><code>skip</code></b> if you don't have one",
"set_command_github": "Type the link or nickname of your 👨‍💻 GitHub profile, type in <b><code>skip</code></b> if you don't have one",
"set_command_steam": "Type the link or nickname of your 🎮 Steam profile, type in <b><code>skip</code></b> if you don't have one",
"set_command_onlyfans": "Type the link or nickname of your 🔞 Onlyfans profile, type in <b><code>skip</code></b> if you don't have one",
"set_command_amazon": "Type the link or id of your wishlist 🎁 Amazon, type in <b><code>skip</code></b> if you don't have one",
"set_command_website": "Type the link or nickname of your 🌎 Personal website, type in <b><code>skip</code></b> if you don't have one",
"set_command_done": "🚀 Are you done! Try using the command <code>/about @{{username}}</code> to see if everything is ok!",
"set_command_skip": "skip",
"set_command_privacy": "Write the list of users (separated from comma) which can use the command /about to show your links, example: <b>@user1, @user2</b>\n\nType in \"<b>public profile</b>\" if you want to allow everyone to use the command /about and see your social media",
"set_command_privacy_done": "🔐 DONE! You set privacy properly!",
"set_command_privacy_skip": "public profile",
"about_command_show_links_error": "🚨 One of the URLs is not valid, it must start with https// and end with .net, .com or other valid domain value. Example: https://fb.me/ptkdev",
"about_command_show_links_error": "🚨 One of the URLs is not valid, it must start with <b>https://</b>\n\n🔧 Fix it with /set or try again /start",
"hears_command_privacy_not_auth": "🔐 You are not authorized by the user to see its links and social, ask you to insert you in the command list of /privacy",
"about_command_show_links": "🌟 The available profiles of @{{username}} are:",
"hears_command_bad_url": "🚨 The inserted URL is invalid, it must start with <b>https://</b>\n\nFix it with /set or try again /start",
"hears_command_bad_url": "🚨 The inserted URL is invalid, it must start with <b>https://</b>\n\n🔧 Fix it with /set or try again /start",
"about_command_user_not_found": "😿 The user @{{username}} did not set his profiles, ask him to do it by typing in private to the bot: @{{bot_nickname}}",
"start_command_nickname_empty": "🚷 You have not set a nickname in your telegram account: enter the settings of the app and insert one, then you do again /start",
"start_command_intro_group": "This bot allows you to share your social profiles and links with Telegram users.\n\nUse the command <code>/about @nickname</code> to see a user's profiles and links, for example:\n\n<code>/about @ptkdev</code>\n\nType in private to @{{bot_nickname}} to set your links and social media.",
Expand Down
30 changes: 15 additions & 15 deletions app/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,28 @@
"about_command_button_onlyfans": "🔞 Onlyfans",
"about_command_button_amazon": "🎁 Amazon",
"set_select_button": "Scegli il bottone che vuoi modificare:",
"set_command_facebook": "Scrivi il link o nickname del tuo profilo 👮‍♂️ Facebook, scrivi \"<b>ignora</b>\" se non ne hai uno",
"set_command_instagram": "Scrivi il link o nickname del tuo profilo 📷 Instagram, scrivi \"<b>ignora</b>\" se non ne hai uno",
"set_command_twitter": "Scrivi il link o nickname del tuo profilo 🐣 Twitter, scrivi \"<b>ignora</b>\" se non ne hai uno",
"set_command_linkedin": "Scrivi il link o nickname del tuo profilo 💼 LinkedIn, scrivi \"<b>ignora</b>\" se non ne hai uno",
"set_command_youtube": "Scrivi il link o nickname del tuo canale 📺 Youtube, scrivi \"<b>ignora</b>\" se non ne hai uno",
"set_command_spotify": "Scrivi il link o id della tua playlist 🎧 Spotify, scrivi \"<b>ignora</b>\" se non ne hai uno",
"set_command_discord": "Scrivi il link o nickname del tuo server 🤖 Discord, scrivi \"<b>ignora</b>\" se non ne hai uno",
"set_command_tiktok": "Scrivi il link o nickname del tuo profilo 👯‍♀️ TikTok, scrivi \"<b>ignora</b>\" se non ne hai uno, esempio",
"set_command_github": "Scrivi il link o nickname del tuo 👨‍💻 GitHub, scrivi \"<b>ignora</b>\" se non ne hai uno, esempio",
"set_command_steam": "Scrivi il link o nickname del tuo 🎮 Steam, scrivi \"<b>ignora</b>\" se non ne hai uno, esempio",
"set_command_onlyfans": "Scrivi il link o nickname del tuo 🔞 Onlyfans, scrivi \"<b>ignora</b>\" se non ne hai uno, esempio",
"set_command_amazon": "Scrivi il link o nickname della tua lista desideri 🎁 Amazon, scrivi \"<b>ignora</b>\" se non ne hai una, esempio",
"set_command_website": "Scrivi il link o nickname del tuo profilo 🌎 Sito web personale, scrivi \"<b>ignora</b>\" se non ne hai uno, esempio",
"set_command_facebook": "Scrivi il link o nickname del tuo profilo 👮‍♂️ Facebook, scrivi <b><code>ignora</code></b> se non ne hai uno",
"set_command_instagram": "Scrivi il link o nickname del tuo profilo 📷 Instagram, scrivi <b><code>ignora</code></b> se non ne hai uno",
"set_command_twitter": "Scrivi il link o nickname del tuo profilo 🐣 Twitter, scrivi <b><code>ignora</code></b> se non ne hai uno",
"set_command_linkedin": "Scrivi il link o nickname del tuo profilo 💼 LinkedIn, scrivi <b><code>ignora</code></b> se non ne hai uno",
"set_command_youtube": "Scrivi il link o nickname del tuo canale 📺 Youtube, scrivi <b><code>ignora</code></b> se non ne hai uno",
"set_command_spotify": "Scrivi il link o id della tua playlist 🎧 Spotify, scrivi <b><code>ignora</code></b> se non ne hai uno",
"set_command_discord": "Scrivi il link o nickname del tuo server 🤖 Discord, scrivi <b><code>ignora</code></b> se non ne hai uno",
"set_command_tiktok": "Scrivi il link o nickname del tuo profilo 👯‍♀️ TikTok, scrivi <b><code>ignora</code></b> se non ne hai uno, esempio",
"set_command_github": "Scrivi il link o nickname del tuo 👨‍💻 GitHub, scrivi <b><code>ignora</code></b> se non ne hai uno, esempio",
"set_command_steam": "Scrivi il link o nickname del tuo 🎮 Steam, scrivi <b><code>ignora</code></b> se non ne hai uno, esempio",
"set_command_onlyfans": "Scrivi il link o nickname del tuo 🔞 Onlyfans, scrivi <b><code>ignora</code></b> se non ne hai uno, esempio",
"set_command_amazon": "Scrivi il link o nickname della tua lista desideri 🎁 Amazon, scrivi <b><code>ignora</code></b> se non ne hai una, esempio",
"set_command_website": "Scrivi il link o nickname del tuo profilo 🌎 Sito web personale, scrivi <b><code>ignora</code></b> se non ne hai uno, esempio",
"set_command_done": "🚀 Hai finito! Prova ad usare il comando <code>/about @{{username}}</code> per vedere se è tutto ok!",
"set_command_skip": "ignora",
"set_command_privacy": "Scrivi l'elenco degli utenti (separato da virgola) i quali possono usare il comando /about per vedere i tuoi links, esempio: <b>@utente1, @utente2</b>\n\nScrivi \"<b>profilo pubblico</b>\" se vuoi permettere a tutti di usare il comando /about e vedere i tuoi social",
"set_command_privacy_done": "🔐 Fatto! Hai impostato la privacy correttamente!",
"set_command_privacy_skip": "profilo pubblico",
"about_command_show_links_error": "🚨 Uno degli url non è valido, deve iniziare con https:// e finire con .net, .com o altri domini validi. Esempio: https://fb.me/ptkdev",
"about_command_show_links_error": "🚨 Uno degli url non è valido, deve iniziare con <b>https://</b>\n\n🔧 Sistemalo usando /set o fai /start di nuovo",
"hears_command_privacy_not_auth": "🔐 Non sei autorizzato dall'utente a vedere i suoi links e social, chiedi di inserirti nell'elenco del comando /privacy",
"about_command_show_links": "🌟 I profili disponibili di @{{username}} sono:",
"hears_command_bad_url": "🚨 L'url inserito non è valido, deve iniziare con <b>https://</b>\n\nSistemalo usando /set o fai /start di nuovo",
"hears_command_bad_url": "🚨 L'url inserito non è valido, deve iniziare con <b>https://</b>\n\n🔧 Sistemalo usando /set o fai /start di nuovo",
"about_command_user_not_found": "😿 L'utente @{{username}} non ha impostato i suoi profili, chiedigli di farlo scrivendo in privato al bot: @{{bot_nickname}}",
"start_command_nickname_empty": "🚷 Non hai impostato un nickname nel tuo account di Telegram, entra nelle impostazioni dell'app e inseriscine uno. Poi fai nuovamente /start",
"start_command_intro_group": "Questo bot permette di condividere i tuoi profili social e link con gli utenti di telegram.\n\nUsa il comando <code>/about @nickname</code> per vedere i profili e link di un utente, ad esempio:\n\n<code>/about @ptkdev</code>\n\nScrivi in privato a @{{bot_nickname}} per impostare i tuoi profili.",
Expand Down
Loading

0 comments on commit 66560d9

Please sign in to comment.