3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

More error information

This commit is contained in:
Dragory 2020-10-11 14:20:12 +03:00
parent efaebe0571
commit dda4313b26
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -137,15 +137,15 @@ export function getPluginConfigPreprocessor(
export function sendSuccessMessage(pluginData: AnyPluginData<any>, channel, body) {
const emoji = pluginData.fullConfig.success_emoji || undefined;
return channel.createMessage(successMessage(body, emoji)).catch(() => {
logger.warn(`Failed to send success message to ${channel.id} (${channel.guild?.id})`);
return channel.createMessage(successMessage(body, emoji)).catch(err => {
logger.warn(`Failed to send success message to ${channel.id} (${channel.guild?.id}): ${err.code} ${err.message}`);
});
}
export function sendErrorMessage(pluginData: AnyPluginData<any>, channel, body) {
const emoji = pluginData.fullConfig.error_emoji || undefined;
return channel.createMessage(errorMessage(body, emoji)).catch(() => {
logger.warn(`Failed to send error message to ${channel.id} (${channel.guild?.id})`);
return channel.createMessage(errorMessage(body, emoji)).catch(err => {
logger.warn(`Failed to send error message to ${channel.id} (${channel.guild?.id}): ${err.code} ${err.message}`);
});
}