Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ About Me Info Bot: Share your social profiles and links on Telegram
- [✔️] Share your GitHub profile on Telegram
- [✔️] Share your GitLab profile on Telegram
- [✔️] Share your Facebook profile on Telegram
- [✔️] Share your Twitter profile on Telegram
- [✔️] Share your X profile on Telegram
- [✔️] Share your TikTok profile on Telegram
- [✔️] Share your Twitch profile on Telegram
- [✔️] Share your Mastodon profile on Telegram
Expand Down Expand Up @@ -164,4 +164,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
- Images and logos have **CC BY-NC 4.0 License**
- Documentations and Translations have **CC BY 4.0 License**

###### Copyleft (c) 2022 [Patryk Rzucidło](https://ptk.dev) ([@PTKDev](https://twitter.com/ptkdev)) <[support@ptkdev.io](mailto:support@ptkdev.io)>
###### Copyleft (c) 2022 [Patryk Rzucidło](https://ptk.dev) ([@PTKDev](https://x.com/ptkdev)) <[support@ptkdev.io](mailto:support@ptkdev.io)>
2 changes: 1 addition & 1 deletion app/functions/api/database/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const schema = new Schema<AboutInterface>({
spotify: { type: String, default: "" },
discord: { type: String, default: "" },
facebook: { type: String, default: "" },
twitter: { type: String, default: "" },
x: { type: String, default: "" },
tiktok: { type: String, default: "" },
gitlab: { type: String, default: "" },
twitch: { type: String, default: "" },
Expand Down
8 changes: 4 additions & 4 deletions app/functions/commands/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const about = async (): Promise<void> => {
account.username === "" ||
(account.facebook === "" &&
account.instagram === "" &&
account.twitter === "" &&
account.x === "" &&
account.linkedin === "" &&
account.youtube === "" &&
account.spotify === "" &&
Expand Down Expand Up @@ -107,9 +107,9 @@ const about = async (): Promise<void> => {
.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.x !== "" &&
(account.x.startsWith("https://") || account.x.startsWith("http://")) &&
buttons.url(translate(lang.language, "about_command_button_x"), account.x).row();

account.github !== "" &&
(account.github.startsWith("https://") || account.github.startsWith("http://")) &&
Expand Down
14 changes: 7 additions & 7 deletions app/functions/commands/hears.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,32 +97,32 @@ const hears = async (): Promise<void> => {
}),
);
} else {
about.step = "twitter";
about.step = "x";

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

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

break;

case "twitter":
case "set_twitter":
case "x":
case "set_x":
if (
!text.startsWith("https://") &&
!text.startsWith("http://") &&
translate(lang.language, "set_command_skip") !== text
) {
text = `https://twitter.com/${text}`;
text = `https://x.com/${text}`;
}

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

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

await db.about.update({ id: about.id }, about);
Expand Down
2 changes: 1 addition & 1 deletion app/functions/commands/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const set = async (): Promise<void> => {

const buttons = new InlineKeyboard();

buttons.text(translate(lang.language, "about_command_button_twitter"), "set_twitter");
buttons.text(translate(lang.language, "about_command_button_x"), "set_x");
buttons.text(translate(lang.language, "about_command_button_facebook"), "set_facebook");
buttons.text(translate(lang.language, "about_command_button_instagram"), "set_instagram");

Expand Down
4 changes: 2 additions & 2 deletions app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"about_command_button_youtube": "📺 YouTube",
"about_command_button_spotify": "🎧 Playlist",
"about_command_button_discord": "🤖 Discord",
"about_command_button_twitter": "🐣 Twitter",
"about_command_button_x": "𝕏 X",
"about_command_button_tiktok": "👯‍♀️ TikTok",
"about_command_button_twitch": "📹 Twitch",
"about_command_button_website": "🌎 Website",
Expand All @@ -38,7 +38,7 @@
"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><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_x": "Type the link or nickname of your 𝕏 X 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",
Expand Down
4 changes: 2 additions & 2 deletions app/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"about_command_button_youtube": "📺 YouTube",
"about_command_button_spotify": "🎧 Playlist",
"about_command_button_discord": "🤖 Discord",
"about_command_button_twitter": "🐣 Twitter",
"about_command_button_x": "𝕏 X",
"about_command_button_tiktok": "👯‍♀️ TikTok",
"about_command_button_gitlab": "🦊 GitLab",
"about_command_button_mastodon": "🦣 Mastodon",
Expand All @@ -38,7 +38,7 @@
"set_select_button": "Scegli il bottone che vuoi modificare:",
"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_x": "Scrivi il link o nickname del tuo profilo 𝕏 X, 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",
Expand Down
2 changes: 1 addition & 1 deletion app/types/databases.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export interface AboutInterface {
spotify: string;
discord: string;
facebook: string;
twitter: string;
x: string;
tiktok: string;
gitlab: string;
twitch: string;
Expand Down