UNPKG

stalkee

Version:

a Telegram bot who can send voice messages via inline mode added by admin with sorting them by numbers of uses

22 lines (21 loc) 651 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setLocation = void 0; const utils_1 = require("../utils"); const models_1 = require("../models"); const setLocation = async (fileUid, location) => { try { const audio = await models_1.Audio.findOneByOrFail({ fileUid: fileUid }); const oldLocation = audio.location; audio.location = location; await audio.save(); return oldLocation; } catch (err) { utils_1.logger.error(err, 'controller.set_location'); return ''; } }; exports.setLocation = setLocation;