Prevented test webhooks being sent in production
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import math from '/imports/math.js';
|
import math from '/imports/math.js';
|
||||||
if (Meteor.isServer){
|
//if (Meteor.isServer){
|
||||||
var sendWebhook = require('/imports/server/discord/webhook.js').default;
|
// var sendWebhook = require('/imports/server/discord/webhook.js').default;
|
||||||
}
|
//}
|
||||||
|
|
||||||
export default function applyAttack({
|
export default function applyAttack({
|
||||||
prop,
|
prop,
|
||||||
@@ -14,8 +14,8 @@ export default function applyAttack({
|
|||||||
if (Meteor.isClient){
|
if (Meteor.isClient){
|
||||||
console.log(`${creature.name} makes a ${prop.name} attack! Rolls ${result} to hit`);
|
console.log(`${creature.name} makes a ${prop.name} attack! Rolls ${result} to hit`);
|
||||||
}
|
}
|
||||||
if (Meteor.isServer) sendWebhook({
|
//if (Meteor.isServer) sendWebhook({
|
||||||
webhook: creature.webhook,
|
// webhook: creature.webhook,
|
||||||
message: `${creature.name} makes a ${prop.name} attack! Rolls ${result} to hit`,
|
// message: `${creature.name} makes a ${prop.name} attack! Rolls ${result} to hit`,
|
||||||
});
|
//});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import evaluateAndRollString from '/imports/api/creature/computation/afterComputation/evaluateAndRollString.js';
|
import evaluateAndRollString from '/imports/api/creature/computation/afterComputation/evaluateAndRollString.js';
|
||||||
|
|
||||||
if (Meteor.isServer){
|
//if (Meteor.isServer){
|
||||||
var sendWebhook = require('/imports/server/discord/webhook.js').default;
|
// var sendWebhook = require('/imports/server/discord/webhook.js').default;
|
||||||
}
|
//}
|
||||||
|
|
||||||
export default function applyDamage({
|
export default function applyDamage({
|
||||||
prop,
|
prop,
|
||||||
@@ -20,8 +20,8 @@ export default function applyDamage({
|
|||||||
errors.forEach(e => console.error(e));
|
errors.forEach(e => console.error(e));
|
||||||
console.log(`${result} ${prop.damageType}${prop.damageType !== 'healing'? ' damage': ''}`);
|
console.log(`${result} ${prop.damageType}${prop.damageType !== 'healing'? ' damage': ''}`);
|
||||||
}
|
}
|
||||||
if (Meteor.isServer) sendWebhook({
|
//if (Meteor.isServer) sendWebhook({
|
||||||
webhook: creature.webhook,
|
// webhook: creature.webhook,
|
||||||
message: `${result} ${prop.damageType}${prop.damageType !== 'healing'? ' damage': ''}`,
|
// message: `${result} ${prop.damageType}${prop.damageType !== 'healing'? ' damage': ''}`,
|
||||||
});
|
//});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user