Added more node name fallbacks, move slash command acknowledge to beginning of image command
This commit is contained in:
parent
0095643dbf
commit
df43f9eb9d
6 changed files with 9 additions and 7 deletions
|
@ -52,6 +52,10 @@ class ImageCommand extends Command {
|
||||||
params: {}
|
params: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (this.type === "application") {
|
||||||
|
await this.acknowledge();
|
||||||
|
}
|
||||||
|
|
||||||
if (this.constructor.requiresImage) {
|
if (this.constructor.requiresImage) {
|
||||||
try {
|
try {
|
||||||
const image = await imageDetect(this.client, this.message, this.interaction, this.options, true);
|
const image = await imageDetect(this.client, this.message, this.interaction, this.options, true);
|
||||||
|
@ -95,8 +99,6 @@ class ImageCommand extends Command {
|
||||||
let status;
|
let status;
|
||||||
if (magickParams.params.type === "image/gif" && this.type === "classic") {
|
if (magickParams.params.type === "image/gif" && this.type === "classic") {
|
||||||
status = await this.processMessage(this.message);
|
status = await this.processMessage(this.message);
|
||||||
} else {
|
|
||||||
await this.acknowledge();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Command from "../../classes/command.js";
|
||||||
class AncientCommand extends Command {
|
class AncientCommand extends Command {
|
||||||
async run() {
|
async run() {
|
||||||
await this.acknowledge();
|
await this.acknowledge();
|
||||||
const controller = new AbortController(); // eslint-disable-line no-undef
|
const controller = new AbortController();
|
||||||
const timeout = setTimeout(() => {
|
const timeout = setTimeout(() => {
|
||||||
controller.abort();
|
controller.abort();
|
||||||
}, 15000);
|
}, 15000);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Command from "../../classes/command.js";
|
||||||
class CatCommand extends Command {
|
class CatCommand extends Command {
|
||||||
async run() {
|
async run() {
|
||||||
await this.acknowledge();
|
await this.acknowledge();
|
||||||
const controller = new AbortController(); // eslint-disable-line no-undef
|
const controller = new AbortController();
|
||||||
const timeout = setTimeout(() => {
|
const timeout = setTimeout(() => {
|
||||||
controller.abort();
|
controller.abort();
|
||||||
}, 15000);
|
}, 15000);
|
||||||
|
|
|
@ -5,7 +5,7 @@ class DonateCommand extends Command {
|
||||||
async run() {
|
async run() {
|
||||||
await this.acknowledge();
|
await this.acknowledge();
|
||||||
let prefix = "";
|
let prefix = "";
|
||||||
const controller = new AbortController(); // eslint-disable-line no-undef
|
const controller = new AbortController();
|
||||||
const timeout = setTimeout(() => {
|
const timeout = setTimeout(() => {
|
||||||
controller.abort();
|
controller.abort();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
|
@ -31,7 +31,7 @@ class NowPlayingCommand extends MusicCommand {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "🌐 Node:",
|
name: "🌐 Node:",
|
||||||
value: player.node.name
|
value: player.node ? player.node.name : "Unknown"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: `${"▬".repeat(parts)}🔘${"▬".repeat(10 - parts)}`,
|
name: `${"▬".repeat(parts)}🔘${"▬".repeat(10 - parts)}`,
|
||||||
|
|
|
@ -147,7 +147,7 @@ export async function nextSong(client, options, connection, track, info, music,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "🌐 Node:",
|
name: "🌐 Node:",
|
||||||
value: connection.node.name
|
value: connection.node ? connection.node.name : "Unknown"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: `${"▬".repeat(parts)}🔘${"▬".repeat(10 - parts)}`,
|
name: `${"▬".repeat(parts)}🔘${"▬".repeat(10 - parts)}`,
|
||||||
|
|
Loading…
Reference in a new issue