Properly log Lavalink connection errors, fix large file fallback message, actions changes
This commit is contained in:
parent
b9f1ccc39e
commit
cfb5cb506f
4 changed files with 10 additions and 18 deletions
|
@ -59,7 +59,7 @@ export default async (client, interaction) => {
|
|||
} else if (error.toString().includes("Timed out")) {
|
||||
await interaction[replyMethod]({ content: "The request timed out before I could download that image. Try uploading your image somewhere else or reducing its size.", flags: 64 });
|
||||
} else {
|
||||
logger.error(`Error occurred with application command ${command} with arguments ${JSON.stringify(interaction.data.options)}: ${error.stack || error}`);
|
||||
logger.error(`Error occurred with application command ${command} with arguments ${JSON.stringify(interaction.data.optionsArray)}: ${error.stack || error}`);
|
||||
try {
|
||||
let err = error;
|
||||
if (error?.constructor?.name == "Promise") err = await error;
|
||||
|
|
|
@ -140,7 +140,9 @@ export default async (client, message) => {
|
|||
if (process.env.TEMPDIR && process.env.TEMPDIR !== "") {
|
||||
await upload(client, result, message);
|
||||
} else {
|
||||
await client.rest.channels.createMessage(message.channelID, "The resulting image was more than 8MB in size, so I can't upload it.");
|
||||
await client.rest.channels.createMessage(message.channelID, {
|
||||
content: "The resulting image was more than 8MB in size, so I can't upload it."
|
||||
});
|
||||
}
|
||||
} else {
|
||||
await client.rest.channels.createMessage(message.channelID, Object.assign({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue