forked from engineering/cloudservices
Merge branch 'master' of gitlab.libraryofcode.org:engineering/cloudservices
commit
ec6adfad41
|
@ -16,7 +16,7 @@
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"eris": "^0.11.2",
|
"eris": "^0.11.2",
|
||||||
"eris-pagination": "bsian03/eris-pagination",
|
"eris-pagination": "bsian03/eris-pagination#dev",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
"helmet": "^3.21.2",
|
"helmet": "^3.21.2",
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default class CWG_Data extends Command {
|
||||||
});
|
});
|
||||||
this.client.signale.log(embeds);
|
this.client.signale.log(embeds);
|
||||||
if (embeds.length === 1) return message.channel.createMessage({ embed: embeds[0] });
|
if (embeds.length === 1) return message.channel.createMessage({ embed: embeds[0] });
|
||||||
return createPaginationEmbed(message, this.client, embeds, {});
|
return createPaginationEmbed(message, embeds);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return this.client.util.handleError(error, message, this);
|
return this.client.util.handleError(error, message, this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ export default class Help extends Command {
|
||||||
return cmdPages.push(embed);
|
return cmdPages.push(embed);
|
||||||
});
|
});
|
||||||
if (cmdPages.length === 1) return message.channel.createMessage({ embed: cmdPages[0] });
|
if (cmdPages.length === 1) return message.channel.createMessage({ embed: cmdPages[0] });
|
||||||
return createPaginationEmbed(message, this.client, cmdPages);
|
return createPaginationEmbed(message, cmdPages);
|
||||||
}
|
}
|
||||||
const resolved = await this.client.util.resolveCommand(args, message);
|
const resolved = await this.client.util.resolveCommand(args, message);
|
||||||
if (!resolved) return message.channel.createMessage(`${this.client.stores.emojis.error} **Command not found!**`);
|
if (!resolved) return message.channel.createMessage(`${this.client.stores.emojis.error} **Command not found!**`);
|
||||||
|
|
|
@ -55,7 +55,7 @@ export default class Modlogs extends Command {
|
||||||
if (embeds.length === 1) {
|
if (embeds.length === 1) {
|
||||||
msg.edit({ content: '', embed: embeds[0] });
|
msg.edit({ content: '', embed: embeds[0] });
|
||||||
} else {
|
} else {
|
||||||
createPaginationEmbed(message, this.client, embeds, {}, msg);
|
createPaginationEmbed(message, embeds, {});
|
||||||
}
|
}
|
||||||
return msg;
|
return msg;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ export default class SecureSign_Account extends Command {
|
||||||
this.name = 'account';
|
this.name = 'account';
|
||||||
this.description = 'Provides SecureSign account details for currently logged in user';
|
this.description = 'Provides SecureSign account details for currently logged in user';
|
||||||
this.usage = `${this.client.config.prefix}securesign account`;
|
this.usage = `${this.client.config.prefix}securesign account`;
|
||||||
this.enabled = true;
|
this.enabled = false;
|
||||||
this.guildOnly = false;
|
this.guildOnly = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ export default class SecureSign_Init extends Command {
|
||||||
|
|
||||||
public async run(message: Message, args: string[]) {
|
public async run(message: Message, args: string[]) {
|
||||||
try {
|
try {
|
||||||
return;
|
|
||||||
const account = await this.client.db.Account.findOne({ userID: message.author.id });
|
const account = await this.client.db.Account.findOne({ userID: message.author.id });
|
||||||
if (!account) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Account not found***`);
|
if (!account) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Account not found***`);
|
||||||
if (!account.hash) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Account not initialized***`);
|
if (!account.hash) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Account not initialized***`);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// "incremental": true, /* Enable incremental compilation */
|
// "incremental": true, /* Enable incremental compilation */
|
||||||
"target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
"target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||||
"lib": ["ESNext", "ES2020", "ES2019.Object"], /* Specify library files to be included in the compilation. */
|
"lib": ["ES2019.Object", "ES2020.Promise"], /* Specify library files to be included in the compilation. */
|
||||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||||
// "checkJs": true, /* Report errors in .js files. */
|
// "checkJs": true, /* Report errors in .js files. */
|
||||||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
|
|
||||||
interface PromiseFulfilledResult<T> {
|
|
||||||
status: 'fulfilled';
|
|
||||||
value: T;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PromiseRejectedResult {
|
|
||||||
status: 'rejected';
|
|
||||||
reason: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
type PromiseSettledResult<T> = PromiseFulfilledResult<T> | PromiseRejectedResult;
|
|
||||||
|
|
||||||
interface PromiseConstructor {
|
|
||||||
/**
|
|
||||||
* Creates a Promise that is resolved with an array of results when all
|
|
||||||
* of the provided Promises resolve or reject.
|
|
||||||
* @param values An array of Promises.
|
|
||||||
* @returns A new Promise.
|
|
||||||
*/
|
|
||||||
allSettled<T extends readonly unknown[] | readonly [unknown]>(values: T):
|
|
||||||
Promise<{ -readonly [P in keyof T]: PromiseSettledResult<T[P] extends PromiseLike<infer U> ? U : T[P]> }>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a Promise that is resolved with an array of results when all
|
|
||||||
* of the provided Promises resolve or reject.
|
|
||||||
* @param values An array of Promises.
|
|
||||||
* @returns A new Promise.
|
|
||||||
*/
|
|
||||||
allSettled<T>(values: Iterable<T>): Promise<PromiseSettledResult<T extends PromiseLike<infer U> ? U : T>[]>;
|
|
||||||
}
|
|
Loading…
Reference in New Issue