Prevented test webhooks being sent in production

This commit is contained in:
Stefan Zermatten
2020-07-26 19:56:08 +02:00
parent 1bde0db0ba
commit a51154e434
2 changed files with 14 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import math from '/imports/math.js';
if (Meteor.isServer){
var sendWebhook = require('/imports/server/discord/webhook.js').default;
}
//if (Meteor.isServer){
// var sendWebhook = require('/imports/server/discord/webhook.js').default;
//}
export default function applyAttack({
prop,
@@ -14,8 +14,8 @@ export default function applyAttack({
if (Meteor.isClient){
console.log(`${creature.name} makes a ${prop.name} attack! Rolls ${result} to hit`);
}
if (Meteor.isServer) sendWebhook({
webhook: creature.webhook,
message: `${creature.name} makes a ${prop.name} attack! Rolls ${result} to hit`,
});
//if (Meteor.isServer) sendWebhook({
// webhook: creature.webhook,
// message: `${creature.name} makes a ${prop.name} attack! Rolls ${result} to hit`,
//});
}

View File

@@ -1,8 +1,8 @@
import evaluateAndRollString from '/imports/api/creature/computation/afterComputation/evaluateAndRollString.js';
if (Meteor.isServer){
var sendWebhook = require('/imports/server/discord/webhook.js').default;
}
//if (Meteor.isServer){
// var sendWebhook = require('/imports/server/discord/webhook.js').default;
//}
export default function applyDamage({
prop,
@@ -20,8 +20,8 @@ export default function applyDamage({
errors.forEach(e => console.error(e));
console.log(`${result} ${prop.damageType}${prop.damageType !== 'healing'? ' damage': ''}`);
}
if (Meteor.isServer) sendWebhook({
webhook: creature.webhook,
message: `${result} ${prop.damageType}${prop.damageType !== 'healing'? ' damage': ''}`,
});
//if (Meteor.isServer) sendWebhook({
// webhook: creature.webhook,
// message: `${result} ${prop.damageType}${prop.damageType !== 'healing'? ' damage': ''}`,
//});
}