aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-05-28 17:37:04 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-05-28 17:37:04 -0400
commitf1cdbd260c6c2249fc0d765949d44d889bcaedc8 (patch)
treea91883fc6de76d739f99c795f1248474df6f1efc /src/commands/info
parentf3cde793e778d1dc29b704d9cce560c6e929e6e8 (diff)
downloadtanzanite-f1cdbd260c6c2249fc0d765949d44d889bcaedc8.tar.gz
tanzanite-f1cdbd260c6c2249fc0d765949d44d889bcaedc8.tar.bz2
tanzanite-f1cdbd260c6c2249fc0d765949d44d889bcaedc8.zip
I can't read anything
Diffstat (limited to 'src/commands/info')
-rw-r--r--src/commands/info/botInfo.ts19
-rw-r--r--src/commands/info/ping.ts26
-rw-r--r--src/commands/info/pronouns.ts4
3 files changed, 16 insertions, 33 deletions
diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts
index 779b318..0226edc 100644
--- a/src/commands/info/botInfo.ts
+++ b/src/commands/info/botInfo.ts
@@ -19,12 +19,14 @@ export default class BotInfoCommand extends BushCommand {
const owners = (await this.client.util.mapIDs(this.client.ownerID))
.map((u) => u.tag)
.join('\n');
- const currentCommit = (
- await this.client.util.shell('git rev-parse HEAD')
- ).stdout.replace('\n', '');
- const repoUrl = (
- await this.client.util.shell('git remote get-url origin')
- ).stdout.replace('\n', '');
+ const currentCommit = (await this.client.util.shell('git rev-parse HEAD')).stdout.replace(
+ '\n',
+ ''
+ );
+ const repoUrl = (await this.client.util.shell('git remote get-url origin')).stdout.replace(
+ '\n',
+ ''
+ );
const embed = new MessageEmbed()
.setTitle('Bot Info:')
.addFields([
@@ -46,10 +48,7 @@ export default class BotInfoCommand extends BushCommand {
},
{
name: 'Current commit',
- value: `[${currentCommit.substring(
- 0,
- 7
- )}](${repoUrl}/commit/${currentCommit})`
+ value: `[${currentCommit.substring(0, 7)}](${repoUrl}/commit/${currentCommit})`
}
])
.setTimestamp();
diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts
index e0bbfc7..9468722 100644
--- a/src/commands/info/ping.ts
+++ b/src/commands/info/ping.ts
@@ -21,20 +21,13 @@ export default class PingCommand extends BushCommand {
const timestamp: number = message.editedTimestamp
? message.editedTimestamp
: message.createdTimestamp;
- const botLatency = `\`\`\`\n ${Math.floor(
- sentMessage.createdTimestamp - timestamp
- )}ms \`\`\``;
- const apiLatency = `\`\`\`\n ${Math.round(
- message.client.ws.ping
- )}ms \`\`\``;
+ const botLatency = `\`\`\`\n ${Math.floor(sentMessage.createdTimestamp - timestamp)}ms \`\`\``;
+ const apiLatency = `\`\`\`\n ${Math.round(message.client.ws.ping)}ms \`\`\``;
const embed = new MessageEmbed()
.setTitle('Pong! 🏓')
.addField('Bot Latency', botLatency, true)
.addField('API Latency', apiLatency, true)
- .setFooter(
- message.author.username,
- message.author.displayAvatarURL({ dynamic: true })
- )
+ .setFooter(message.author.username, message.author.displayAvatarURL({ dynamic: true }))
.setTimestamp();
await sentMessage.edit({
content: null,
@@ -45,21 +38,14 @@ export default class PingCommand extends BushCommand {
public async execSlash(message: CommandInteraction): Promise<void> {
const timestamp1 = message.createdTimestamp;
await message.reply('Pong!');
- const timestamp2 = await message
- .fetchReply()
- .then((m) => (m as Message).createdTimestamp);
- const botLatency = `\`\`\`\n ${Math.floor(
- timestamp2 - timestamp1
- )}ms \`\`\``;
+ const timestamp2 = await message.fetchReply().then((m) => (m as Message).createdTimestamp);
+ const botLatency = `\`\`\`\n ${Math.floor(timestamp2 - timestamp1)}ms \`\`\``;
const apiLatency = `\`\`\`\n ${Math.round(this.client.ws.ping)}ms \`\`\``;
const embed = new MessageEmbed()
.setTitle('Pong! 🏓')
.addField('Bot Latency', botLatency, true)
.addField('API Latency', apiLatency, true)
- .setFooter(
- message.user.username,
- message.user.displayAvatarURL({ dynamic: true })
- )
+ .setFooter(message.user.username, message.user.displayAvatarURL({ dynamic: true }))
.setTimestamp();
await message.editReply({
content: null,
diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts
index 2c1d5f2..ca70ff0 100644
--- a/src/commands/info/pronouns.ts
+++ b/src/commands/info/pronouns.ts
@@ -66,9 +66,7 @@ export default class PronounsCommand extends BushCommand {
): Promise<void> {
try {
const apiRes: { pronouns: pronounsType } = await got
- .get(
- `https://pronoundb.org/api/v1/lookup?platform=discord&id=${user.id}`
- )
+ .get(`https://pronoundb.org/api/v1/lookup?platform=discord&id=${user.id}`)
.json();
if (message instanceof Message) {
message.reply(