performance fixes
parent
9bfcacae0f
commit
687e767565
|
@ -15,7 +15,7 @@ export default class Queue {
|
|||
constructor(client: Client) {
|
||||
this.client = client;
|
||||
this.queues = {
|
||||
score: new Bull('score', { prefix: 'queue::score', limiter: { max: 80, duration: 1000 } }),
|
||||
score: new Bull('score', { prefix: 'queue::score' }),
|
||||
};
|
||||
this.setProcessors();
|
||||
this.setCronJobs();
|
||||
|
|
|
@ -17,7 +17,13 @@ export default class Notes extends Command {
|
|||
try {
|
||||
if (!args[0]) return this.client.commands.get('help').run(message, [this.name]);
|
||||
let member: Member | User = this.client.util.resolveMember(args[0], this.mainGuild);
|
||||
if (!member) member = await this.client.getRESTUser(args[0]);
|
||||
if (!member) {
|
||||
try {
|
||||
member = await this.client.getRESTUser(args[0]);
|
||||
} catch {
|
||||
member = undefined;
|
||||
}
|
||||
}
|
||||
if (!member) return this.error(message.channel, 'User specified could not be found.');
|
||||
|
||||
const notes = await this.client.db.Note.find({ userID: member.id });
|
||||
|
|
Loading…
Reference in New Issue