Remove unneeded macro
This commit is contained in:
parent
6f04910d2c
commit
c7775e7a99
1 changed files with 0 additions and 34 deletions
|
|
@ -1,34 +0,0 @@
|
||||||
const rolls = {};
|
|
||||||
|
|
||||||
const response = await taf.QueryManager.query(
|
|
||||||
{
|
|
||||||
id: `test-data-request`,
|
|
||||||
question: `Test Data`,
|
|
||||||
inputs: [
|
|
||||||
{
|
|
||||||
type: `input`,
|
|
||||||
inputType: `number`,
|
|
||||||
key: `statBase`,
|
|
||||||
label: `Stat Base`,
|
|
||||||
}
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
onSubmit: async (userID, answers) => {
|
|
||||||
|
|
||||||
rolls[userID] = [];
|
|
||||||
|
|
||||||
const diceHTML = [];
|
|
||||||
for (let i = 0; i < answers.statBase; i++) {
|
|
||||||
const rolled = Math.floor(Math.random() * 6) + 1;
|
|
||||||
rolls[userID].push(rolled);
|
|
||||||
diceHTML.push(`<li class="roll dice d6">${rolled}</li>`);
|
|
||||||
};
|
|
||||||
|
|
||||||
const content = `Rolls:<div class="dice-tooltip"><ol class="dice-rolls">${diceHTML.join(`\n`)}</ol></div>`;
|
|
||||||
|
|
||||||
await taf.QueryManager.notify(userID, content);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
console.log({ response, rolls });
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue