Improved string variable names

This commit is contained in:
Luquinhas 2025-01-10 10:09:47 -03:00
parent d1494fbd80
commit 8227d88e72
No known key found for this signature in database
GPG key ID: D9B075FC6DC93985
6 changed files with 26 additions and 26 deletions

View file

@ -91,17 +91,17 @@ module.exports = (bot) => {
handleAdminCommand(ctx, async () => {
try {
const commitHash = await getGitCommitHash();
await ctx.reply(Strings.currentCommit.replace('{commitHash}', commitHash), {
await ctx.reply(Strings.gitCurrentCommit.replace('{commitHash}', commitHash), {
parse_mode: 'Markdown',
reply_to_message_id: ctx.message.message_id
});
} catch (error) {
ctx.reply(Strings.errorRetrievingCommit.replace('{error}', error), {
ctx.reply(Strings.gitErrRetrievingCommit.replace('{error}', error), {
parse_mode: 'Markdown',
reply_to_message_id: ctx.message.message_id
});
}
}, '', Strings.errorRetrievingCommit);
}, '', Strings.gitErrRetrievingCommit);
});
bot.command('updatebot', spamwatchMiddleware, async (ctx) => {
@ -159,12 +159,12 @@ module.exports = (bot) => {
caption: botFile
});
} catch (error) {
ctx.reply(Strings.varErr.replace('{error}', error.message), {
ctx.reply(Strings.unexpectedErr.replace('{error}', error.message), {
parse_mode: 'Markdown',
reply_to_message_id: ctx.message.message_id
});
}
}, '', Strings.varErr);
}, '', Strings.unexpectedErr);
});
bot.command('run', spamwatchMiddleware, async (ctx) => {

View file

@ -97,7 +97,7 @@ module.exports = (bot) => {
sendRandomReply(ctx, resources.gayFlag, 'isGay', 'isNtGay');
});
bot.command('soggy', spamwatchMiddleware, async (ctx) => {
bot.command('soggy', 'soggycat', spamwatchMiddleware, async (ctx) => {
const userInput = ctx.message.text.split(' ')[1];
switch (true) {

View file

@ -46,7 +46,7 @@ module.exports = (bot) => {
disable_web_page_preview: true,
reply_markup: JSON.stringify({
inline_keyboard: [
[{ text: Strings.goBack, callback_data: 'helpBack' }],
[{ text: Strings.varBack, callback_data: 'helpBack' }],
]
})
};
@ -93,7 +93,7 @@ module.exports = (bot) => {
await sendHelpMessage(ctx, true);
break;
default:
await ctx.answerCbQuery(Strings.invalidOption);
await ctx.answerCbQuery(Strings.errInvalidOption);
break;
}
});

View file

@ -38,7 +38,7 @@ module.exports = (bot) => {
const args = ctx.message.text;
if (args.length < 9) {
return ctx.reply(Strings.provideLocation, {
return ctx.reply(Strings.weatherProvideLocation, {
parse_mode: "Markdown",
reply_to_message_id: ctx.message.message_id
});
@ -59,7 +59,7 @@ module.exports = (bot) => {
const locationData = locationResponse.data.location;
if (!locationData || !locationData.address) {
return ctx.reply(Strings.invalidLocation, {
return ctx.reply(Strings.weatherInvalidLocation, {
parse_mode: "Markdown",
reply_to_message_id: ctx.message.message_id
});