Skip to content

Instantly share code, notes, and snippets.

// Module imports
import { MessageEmbed } from 'discord.js'
// Local imports
import { Command } from '../structures/Command.js'
import { fortunes } from '../../data/fortunes.js'
// Local imports
import {
client,
q,
} from './fauna.js'
Query(
Lambda(
["index"],
Get(
Select(
["data", Var("index")],
Paginate(Match(Index("fortuneRefs")), { size: 100000 })
)
)
)
Query(
Lambda(
["index"],
Let(
{
ref: Select(
["data", 0],
Paginate(Documents(Collection("Fortunes")), { size: 1 })
)
},
Query(Lambda(
[],
Count(
Documents(
Collection("Fortunes")
)
)
))
// Module imports
import { MessageEmbed } from 'discord.js'
// Local imports
import { Command } from '../structures/Command.js'
// Local imports
import { Command } from '../structures/Command.js'
export default new Command({
// Meta
name: '8ball',
// Local imports
import { capitalise } from '../helpers/capitalise.js'
export class Command {
/****************************************************************************\
* Public methods
// Local imports
import { Command } from '../structures/Command.js'
export default new Command({
// Meta
name: 'ping',
// Module imports
import { SlashCommandBuilder } from '@discordjs/builders'
export class Command {
/****************************************************************************\
* Instance properties