useless awaits

merge-requests/5/head
eirk 2021-08-23 13:23:20 -04:00
parent 87b320f2fb
commit 3cfefda5ce
6 changed files with 11 additions and 11 deletions

View File

@ -70,10 +70,10 @@ export default class AccountUtil {
</body> </body>
`, `,
}); });
const guild = await this.client.guilds.cache.get('446067825673633794'); const guild = this.client.guilds.cache.get('446067825673633794');
const member = await guild.members.cache.get(data.userID); const member = guild.members.cache.get(data.userID);
member.roles.add('546457886440685578'); await member.roles.add('546457886440685578');
const user = await this.client.users.cache.get(data.userID); const user = this.client.users.cache.get(data.userID);
user.send('<:loc:607695848612167700> **Thank you for creating an account with us!** <:loc:607695848612167700>\n' user.send('<:loc:607695848612167700> **Thank you for creating an account with us!** <:loc:607695848612167700>\n'
+ `Please log into your account by running \`ssh ${data.username}@cloud.libraryofcode.org\` in your terminal, then use the password \`${tempPass}\` to log in.\n` + `Please log into your account by running \`ssh ${data.username}@cloud.libraryofcode.org\` in your terminal, then use the password \`${tempPass}\` to log in.\n`
+ `You will be asked to change your password, \`(current) UNIX password\` is \`${tempPass}\`, then create a password that is at least 12 characters long, with at least one number, special character, and an uppercase letter\n` + `You will be asked to change your password, \`(current) UNIX password\` is \`${tempPass}\`, then create a password that is at least 12 characters long, with at least one number, special character, and an uppercase letter\n`

View File

@ -221,9 +221,9 @@ export default class Util {
this.exec(`deluser ${username} --remove-home --backup-to /management/Archives && rm -rf -R ${account.homepath}`), this.exec(`deluser ${username} --remove-home --backup-to /management/Archives && rm -rf -R ${account.homepath}`),
this.client.db.Account.deleteOne({ username }), this.client.db.Account.deleteOne({ username }),
]; ];
const guild = await this.client.guilds.cache.get('446067825673633794'); const guild = this.client.guilds.cache.get('446067825673633794');
const member = await guild.members.fetch(account.userID); const member = await guild.members.fetch(account.userID);
member.roles.remove('546457886440685578', 'Cloud Account Deleted'); await member.roles.remove('546457886440685578', 'Cloud Account Deleted');
// @ts-ignore // @ts-ignore
await Promise.all(tasks); await Promise.all(tasks);
} }
@ -304,7 +304,7 @@ export default class Util {
.setTimestamp(); .setTimestamp();
if (reason) embed.addField('Reason', reason || 'Not specified'); if (reason) embed.addField('Reason', reason || 'Not specified');
if (type === 2) embed.addField('Lock Expiration', `${date ? moment(date).format('dddd, MMMM Do YYYY, h:mm:ss A') : 'Indefinitely'}`); if (type === 2) embed.addField('Lock Expiration', `${date ? moment(date).format('dddd, MMMM Do YYYY, h:mm:ss A') : 'Indefinitely'}`);
const ch = await this.client.channels.cache.get('580950455581147146') as TextChannel; const ch = this.client.channels.cache.get('580950455581147146') as TextChannel;
ch.send({ embeds: [embed] }); ch.send({ embeds: [embed] });
this.client.users.fetch(userID).then((channel) => channel.send({ embeds: [embed] })).catch(); this.client.users.fetch(userID).then((channel) => channel.send({ embeds: [embed] })).catch();

View File

@ -42,7 +42,7 @@ export default class ApplyT2 extends Command {
embed.setFooter(this.client.user.username, this.client.user.avatarURL()); embed.setFooter(this.client.user.username, this.client.user.avatarURL());
embed.setTimestamp(); embed.setTimestamp();
await this.client.util.sendMessageToUserTerminal(account.username, 'A technician has changed your tier to 2').catch(() => { }); await this.client.util.sendMessageToUserTerminal(account.username, 'A technician has changed your tier to 2').catch(() => { });
const ch = await this.client.channels.cache.get('580950455581147146') as TextChannel; const ch = this.client.channels.cache.get('580950455581147146') as TextChannel;
ch.send({ embeds: [embed] }); ch.send({ embeds: [embed] });
return this.client.users.fetch(account.userID).then((channel) => channel.send({ embeds: [embed] })).catch(); return this.client.users.fetch(account.userID).then((channel) => channel.send({ embeds: [embed] })).catch();
} }

View File

@ -51,7 +51,7 @@ export default class CWG_Delete extends Command {
await this.client.db.Domain.deleteOne({ domain: domain.domain }); await this.client.db.Domain.deleteOne({ domain: domain.domain });
await this.client.util.exec('systemctl reload nginx'); await this.client.util.exec('systemctl reload nginx');
edit.edit(`***${this.client.stores.emojis.success} Domain ${domain.domain} with port ${domain.port} has been successfully deleted.***`); edit.edit(`***${this.client.stores.emojis.success} Domain ${domain.domain} with port ${domain.port} has been successfully deleted.***`);
const ch = await this.client.channels.cache.get('580950455581147146') as TextChannel; const ch = this.client.channels.cache.get('580950455581147146') as TextChannel;
ch.send({ embeds: [embed] }); ch.send({ embeds: [embed] });
return this.client.users.fetch(domain.account.userID).then((u) => u.send({ embeds: [embed] })).catch(() => {}); return this.client.users.fetch(domain.account.userID).then((u) => u.send({ embeds: [embed] })).catch(() => {});
} catch (error) { } catch (error) {

View File

@ -27,7 +27,7 @@ export default class Notify extends Command {
u.send({ embeds: [embed] }); u.send({ embeds: [embed] });
}); });
embed.addField('User', `${account.username} | <@${account.userID}>`, true); embed.addField('User', `${account.username} | <@${account.userID}>`, true);
const ch = await this.client.channels.cache.get('580950455581147146') as TextChannel; const ch = this.client.channels.cache.get('580950455581147146') as TextChannel;
ch.send({ embeds: [embed] }); ch.send({ embeds: [embed] });
this.client.util.transport.sendMail({ this.client.util.transport.sendMail({
to: account.emailAddress, to: account.emailAddress,

View File

@ -37,7 +37,7 @@ export default class Tier extends Command {
embed.setFooter(this.client.user.username, this.client.user.avatarURL()); embed.setFooter(this.client.user.username, this.client.user.avatarURL());
embed.setTimestamp(); embed.setTimestamp();
await this.client.util.sendMessageToUserTerminal(account.username, `A technician has changed your tier to ${args[1]}`).catch(() => { }); await this.client.util.sendMessageToUserTerminal(account.username, `A technician has changed your tier to ${args[1]}`).catch(() => { });
const ch = await this.client.channels.cache.get('580950455581147146') as TextChannel; const ch = this.client.channels.cache.get('580950455581147146') as TextChannel;
ch.send({ embeds: [embed] }); ch.send({ embeds: [embed] });
return this.client.users.fetch(account.userID).then((u) => u.send({ embeds: [embed] })).catch(); return this.client.users.fetch(account.userID).then((u) => u.send({ embeds: [embed] })).catch();
} catch (error) { } catch (error) {