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 13, 2022
2 parents cd69189 + d6feab7 commit 3db297a
Show file tree
Hide file tree
Showing 11 changed files with 199 additions and 498 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
@@ -1,15 +1,19 @@
# v0.6.4 (November 12, 2022)
# v0.6.5 (November 13, 2022)

- New: youtube
- New: discord
- Fix: set your social links with url or nickname
- New: spotify playlist

<!-- 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.4 (November 12, 2022)

- New: youtube
- New: discord
- Fix: set your social links with url or nickname

# v0.6.3 (November 07, 2022)

- Fix: Telegram Topics
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -4,7 +4,7 @@

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

[![v0.6.4](https://img.shields.io/badge/version-v0.6.4-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.5-beta.1](https://img.shields.io/badge/version-v0.6.5--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 Expand Up @@ -50,6 +50,7 @@ About Me Info Bot: Share your social profiles and links on Telegram
- [✔️] Share your steam profile on Telegram
- [✔️] Share your linkedin profile on Telegram
- [✔️] Share your youtube profile on Telegram
- [✔️] Share your spotify playlist on Telegram
- [✔️] Share your discord profile on Telegram
- [✔️] Share your onlyfans profile on Telegram
- [✔️] Share your website on Telegram
Expand Down
1 change: 1 addition & 0 deletions app/functions/api/database/about.ts
Expand Up @@ -20,6 +20,7 @@ const schema = new Schema<AboutInterface>({
github: { type: String, default: "" },
linkedin: { type: String, default: "" },
youtube: { type: String, default: "" },
spotify: { type: String, default: "" },
discord: { type: String, default: "" },
facebook: { type: String, default: "" },
twitter: { type: String, default: "" },
Expand Down
4 changes: 4 additions & 0 deletions app/functions/commands/about.ts
Expand Up @@ -54,6 +54,7 @@ const about = async (): Promise<void> => {
account.twitter === "" &&
account.linkedin === "" &&
account.youtube === "" &&
account.spotify === "" &&
account.discord === "" &&
account.tiktok === "" &&
account.steam === "" &&
Expand Down Expand Up @@ -115,6 +116,9 @@ const about = async (): Promise<void> => {
account.youtube !== "" &&
buttons.url(translate(lang.language, "about_command_button_youtube"), account.youtube).row();

account.spotify !== "" &&
buttons.url(translate(lang.language, "about_command_button_spotify"), account.spotify).row();

account.discord !== "" &&
buttons.url(translate(lang.language, "about_command_button_discord"), account.discord).row();

Expand Down
37 changes: 37 additions & 0 deletions app/functions/commands/hears.ts
Expand Up @@ -199,6 +199,43 @@ const hears = async (): Promise<void> => {
if (about.step.toString() === "set_youtube") {
about.step = "done";

await db.about.update({ id: about.id }, about);
await telegram.api.message.send(
ctx,
telegram.api.message.getChatID(ctx),
translate(lang.language, "set_command_done", {
username: telegram.api.message.getUsername(ctx),
}),
);
} else {
about.step = "spotify";

await db.about.update({ id: about.id }, about);

await telegram.api.message.send(
ctx,
telegram.api.message.getChatID(ctx),
translate(lang.language, "set_command_spotify"),
);
}

break;

case "spotify":
case "set_spotify":
if (
!text.startsWith("https://") &&
!text.startsWith("http://") &&
translate(lang.language, "set_command_skip") !== text
) {
text = `https://open.spotify.com/playlist/${text}`;
}

about.spotify = text === translate(lang.language, "set_command_skip") ? "" : text;

if (about.step.toString() === "set_spotify") {
about.step = "done";

await db.about.update({ id: about.id }, about);
await telegram.api.message.send(
ctx,
Expand Down
1 change: 1 addition & 0 deletions app/functions/commands/set.ts
Expand Up @@ -51,6 +51,7 @@ const set = async (): Promise<void> => {
buttons.row();

buttons.text(translate(lang.language, "about_command_button_youtube"), "set_youtube");
buttons.text(translate(lang.language, "about_command_button_spotify"), "set_spotify");
buttons.text(translate(lang.language, "about_command_button_discord"), "set_discord");

buttons.row();
Expand Down
4 changes: 3 additions & 1 deletion app/translations/en.json
Expand Up @@ -22,6 +22,7 @@
"about_command_button_instagram": "📷 Instagram",
"about_command_button_linkedin": "💼 LinkedIn",
"about_command_button_youtube": "📺 Youtube",
"about_command_button_spotify": "🎧 Playlist",
"about_command_button_discord": "🤖 Discord",
"about_command_button_twitter": "🐣 Twitter",
"about_command_button_tiktok": "👯‍♀️ TikTok",
Expand All @@ -36,6 +37,7 @@
"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",
Expand All @@ -54,7 +56,7 @@
"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",
"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. Use the command /about @nickname to see a user's profiles and links, for example:\n\n/about @ptkdev\n\nType in private to @{{bot_nickname}} to set your links and social media.",
"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.",
"ral_command": "||The RAL of {{username}}, {{ral}}k\\!||",
"ral_command_error": "The correct format is:\n\n<code>/ral @nickname</code>\n\n<code>example: /ral @ptkdev</code>. Try again!"
}
4 changes: 3 additions & 1 deletion app/translations/it.json
Expand Up @@ -22,6 +22,7 @@
"about_command_button_instagram": "📷 Instagram",
"about_command_button_linkedin": "💼 LinkedIn",
"about_command_button_youtube": "📺 Youtube",
"about_command_button_spotify": "🎧 Playlist",
"about_command_button_discord": "🤖 Discord",
"about_command_button_twitter": "🐣 Twitter",
"about_command_button_tiktok": "👯‍♀️ TikTok",
Expand All @@ -36,6 +37,7 @@
"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",
Expand All @@ -54,7 +56,7 @@
"hears_command_bad_url": "🚨 L'url inserito non è valido, deve iniziare con <b>https://</b>\n\nSistemalo 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. Usa il comando /about @nickname per vedere i profili e link di un utente, ad esempio:\n\n/about @ptkdev\n\nScrivi in privato a @{{bot_nickname}} per impostare i tuoi profili.",
"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.",
"ral_command": "||La RAL di {{username}}, {{ral}}k\\!||",
"ral_command_error": "Il formato corretto è:\n\n<code>/ral @nickname</code>\n\n<code>esempio: /ral @ptkdev</code>. Riprova!"
}
1 change: 1 addition & 0 deletions app/types/databases.type.ts
Expand Up @@ -191,6 +191,7 @@ export interface AboutInterface {
github: string;
linkedin: string;
youtube: string;
spotify: string;
discord: string;
facebook: string;
twitter: string;
Expand Down

0 comments on commit 3db297a

Please sign in to comment.