This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query(Lambda( | |
[], | |
Count( | |
Documents( | |
Collection("Fortunes") | |
) | |
) | |
)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query( | |
Lambda( | |
["index"], | |
Let( | |
{ | |
ref: Select( | |
["data", 0], | |
Paginate(Documents(Collection("Fortunes")), { size: 1 }) | |
) | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query( | |
Lambda( | |
["index"], | |
Get( | |
Select( | |
["data", Var("index")], | |
Paginate(Match(Index("fortuneRefs")), { size: 100000 }) | |
) | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Local imports | |
import { | |
client, | |
q, | |
} from './fauna.js' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Module imports | |
import { MessageEmbed } from 'discord.js' | |
// Local imports | |
import { Command } from '../structures/Command.js' | |
import { fortunes } from '../../data/fortunes.js' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[ | |
["C3"], | |
[4, "C2", "E2", "G2"] | |
], | |
[["C3"]], | |
[["G3"]], | |
[["G3"]], | |
[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const valueArrays = [ | |
[1, 2], | |
[100, 400, 700], | |
] | |
const TOTAL_COMBINATIONS = valueArrays | |
.reduce((accumulator, values, index) => { | |
if (index === 0) { | |
return values.length | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add all items in an array of numbers. | |
*/ | |
function addArray(array) { | |
return array.reduce((a, b) => a + b) | |
} | |
/** | |
* Calculate total stats (keyed by category), then generate | |
* additional meta stats based on initial calculations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"success": 1, | |
"code": "OK", | |
"msg": "OK", | |
"data": { | |
"config": { | |
"nearPlane": 2, | |
"farPlane": 12345, | |
"stars": { | |
"useStarFading": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"success": 1, | |
"code": "OK", | |
"msg": "OK", | |
"data": { | |
"rowcount": 1, | |
"totalrows": 1, | |
"estimatedrows": false, | |
"pagesize": 0, | |
"pagecount": null, |