Removed node version check, promisified many gm calls
This commit is contained in:
parent
1c9d40041b
commit
1e259ab312
24 changed files with 187 additions and 276 deletions
|
@ -1,3 +1,5 @@
|
|||
const gm = require("gm");
|
||||
const { promisify } = require("util");
|
||||
const client = require("../utils/client.js");
|
||||
const database = require("../utils/database.js");
|
||||
const logger = require("../utils/logger.js");
|
||||
|
@ -33,6 +35,12 @@ module.exports = async () => {
|
|||
setTimeout(activityChanger, 900000);
|
||||
})();
|
||||
|
||||
// add gm extensions
|
||||
gm.prototype.writePromise = promisify(gm.prototype.write);
|
||||
gm.prototype.streamPromise = promisify(gm.prototype.stream);
|
||||
gm.prototype.sizePromise = promisify(gm.prototype.size);
|
||||
gm.prototype.identifyPromise = promisify(gm.prototype.identify);
|
||||
|
||||
// tweet stuff
|
||||
if (twitter !== null && twitter.active === false) {
|
||||
const blocks = await twitter.client.get("blocks/ids", { stringify_ids: true });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue