3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 00:05:04 +00:00

More error information

This commit is contained in:
Dragory 2020-10-11 14:20:12 +03:00
parent 9109f9ecf9
commit 7b124e41bf

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}`);
});
}