mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-03-09 20:29:57 +00:00
Destroying Last.fm command codebase by doing more friendly messages to the user
This commit is contained in:
parent
5d838095b2
commit
9c0126738e
3
nodemon.json
Normal file
3
nodemon.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"ignore": ["src/props/*.json", "src/props/*.txt"]
|
||||
}
|
@ -145,12 +145,20 @@ module.exports = (bot) => {
|
||||
});
|
||||
};
|
||||
|
||||
const message = Strings.lastFmStatusFor
|
||||
let message = Strings.lastFmStatusFor
|
||||
.replace("{lastfmUser}", `[${lastfmUser}](${userUrl})`)
|
||||
.replace("{nowPlaying}", nowPlaying)
|
||||
.replace("{trackName}", `[${trackName}](${trackUrl})`)
|
||||
.replace("{artistName}", `[${artistName}](${artistUrl})`)
|
||||
.replace("{plays}", `${num_plays}`);
|
||||
|
||||
if (`${num_plays}` !== "0" && `${num_plays}` !== "1" && `${num_plays}` !== "2" && `${num_plays}` !== "3") {
|
||||
message = message
|
||||
.replace("{playCount}", Strings.lastFmPlayCount)
|
||||
.replace("{plays}", `${num_plays}`);
|
||||
} else {
|
||||
message = message
|
||||
.replace("{playCount}", Strings.varTo);
|
||||
};
|
||||
|
||||
if (imageUrl) {
|
||||
ctx.replyWithPhoto(imageUrl, {
|
||||
|
@ -7,6 +7,7 @@
|
||||
"unKnown": "Unknown",
|
||||
"varYes": "Yes",
|
||||
"varNo": "No",
|
||||
"varTo": " to",
|
||||
"varNone": "None",
|
||||
"invalidOption": "Whoops! Invalid option!",
|
||||
"kickingMyself": "*Since you don't need me, I'll leave.*",
|
||||
@ -37,10 +38,11 @@
|
||||
"lastFmNoUser": "*Please provide a Last.fm username.*\nExample: `/setuser <username>`",
|
||||
"lastFmNoSet": "*You haven't set your Last.fm username yet.*\nUse the command /setuser to set.\n\nExample: `/setuser <username>`",
|
||||
"lastFmNoRecent": "*No recent tracks found for Last.fm user* `{lastfmUser}`*.*",
|
||||
"lastFmListeningNow": "Listening now",
|
||||
"lastFmListeningNow": "is",
|
||||
"lastFmUserSet": "*Your Last.fm username has been set to:* `{lastUser}`.",
|
||||
"lastFmLastPlayed": "Last played",
|
||||
"lastFmStatusFor": "*Last.fm status for user* {lastfmUser}*:*\n\n*{nowPlaying}*: {trackName} by {artistName} \n\n*Number of plays*: {plays}",
|
||||
"lastFmLastPlayed": "was",
|
||||
"lastFmStatusFor": "{lastfmUser} *{nowPlaying} listening{playCount}*:\n\n{trackName} by {artistName}",
|
||||
"lastFmPlayCount": " by the {plays}th time",
|
||||
"lastFmErr": "*Error retrieving data for Last.fm user* {lastfmUser}.\n\n`{err}`",
|
||||
"currentCommit": "*Current commit:* `{commitHash}`",
|
||||
"errorRetrievingCommit": "*Error retrieving commit:* {error}",
|
||||
|
@ -6,7 +6,8 @@
|
||||
"aboutBot": "Sobre o bot",
|
||||
"unKnown": "Desconhecido",
|
||||
"varYes": "Sim",
|
||||
"varNo": "Nsão",
|
||||
"varNo": "Não",
|
||||
"varTo": "",
|
||||
"varNone": "Nenhum",
|
||||
"invalidOption": "Ops! Opção inválida!",
|
||||
"kickingMyself": "*Já que você não precisa de mim, vou sair daqui.*",
|
||||
@ -37,10 +38,11 @@
|
||||
"lastFmNoUser": "*Por favor, forneça um nome de usuário do Last.fm.*\nExemplo: `/setuser <username>`",
|
||||
"lastFmNoSet": "*Você ainda não definiu seu nome de usuário do Last.fm.*\nUse o comando /setuser para definir.\n\nExemplo: `/setuser <username>`",
|
||||
"lastFmNoRecent": "*Nenhuma faixa recente encontrada para o usuário do Last.fm* `{lastfmUser}`*.*",
|
||||
"lastFmListeningNow": "Ouvindo agora",
|
||||
"lastFmListeningNow": "está",
|
||||
"lastFmUserSet": "*Seu nome de usuário do Last.fm foi definido como:* `{lastUser}`.",
|
||||
"lastFmLastPlayed": "Última reprodução",
|
||||
"lastFmStatusFor": "*Status do Last.fm para o usuário* {lastfmUser}*:*\n\n*{nowPlaying}*: {trackName} por {artistName}\n\n*Número de reproduções*: {plays}",
|
||||
"lastFmLastPlayed": "estava",
|
||||
"lastFmStatusFor": "{lastfmUser} *{nowPlaying} ouvindo{playCount}*:\n\n{trackName} por {artistName}",
|
||||
"lastFmPlayCount": " pela {plays}ª vez",
|
||||
"lastFmErr": "*Erro ao recuperar dados para o usuário do Last.fm* {lastfmUser}.\n\n`{err}`",
|
||||
"currentCommit": "*Commit atual:* `{commitHash}`",
|
||||
"errorRetrievingCommit": "*Erro ao obter o commit:*\n\n`{error}`",
|
||||
|
Loading…
x
Reference in New Issue
Block a user