rf: js -> ts
This commit is contained in:
parent
33c9120361
commit
efadb51905
32 changed files with 333 additions and 246 deletions
|
@ -17,6 +17,4 @@ function getStrings(languageCode) {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getStrings
|
||||
};
|
||||
export { getStrings };
|
|
@ -1,14 +0,0 @@
|
|||
function verifyInput(ctx, userInput, message, verifyNaN = false) {
|
||||
if (!userInput || (verifyNaN && isNaN(userInput))) {
|
||||
ctx.reply(message, {
|
||||
parse_mode: "Markdown",
|
||||
reply_to_message_id: ctx.message.message_id
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
verifyInput
|
||||
};
|
10
src/plugins/verifyInput.ts
Normal file
10
src/plugins/verifyInput.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
export default function verifyInput(ctx: any, userInput: string, message: string, verifyNaN = false) {
|
||||
if (!userInput || (verifyNaN && isNaN(Number(userInput)))) { // not sure why isNaN is used here, but the input should be a number
|
||||
ctx.reply(message, {
|
||||
parse_mode: "Markdown",
|
||||
reply_to_message_id: ctx.message.message_id
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
const axios = require('axios');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
import axios from 'axios';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
|
||||
const downloadDir = path.resolve(__dirname, 'yt-dlp');
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue