mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 18:35:10 +02:00
Towelification of the name
This commit is contained in:
parent
12862f86f7
commit
3d82e3f6ee
@ -51,7 +51,7 @@ async function generateRocketeer( id, network='mainnet' ) {
|
|||||||
|
|
||||||
// The base object of a new Rocketeer
|
// The base object of a new Rocketeer
|
||||||
const rocketeer = {
|
const rocketeer = {
|
||||||
name: `${ name.first() } ${ name.middle() } ${ name.last() } of ${ pickRandomArrayEntry( heavenlyBodies ) }`,
|
name: `${ name.first() } ${ name.middle() } ${ name.last() } of ${ id % 42 == 0 ? 'the Towel' : pickRandomArrayEntry( heavenlyBodies ) }`,
|
||||||
description: lorem,
|
description: lorem,
|
||||||
image: ``,
|
image: ``,
|
||||||
external_url: `https://viewer.rocketeer.fans/?rocketeer=${ id }` + ( network == 'mainnet' ? '' : '&testnet=true' ),
|
external_url: `https://viewer.rocketeer.fans/?rocketeer=${ id }` + ( network == 'mainnet' ? '' : '&testnet=true' ),
|
||||||
@ -94,13 +94,13 @@ async function generateRocketeer( id, network='mainnet' ) {
|
|||||||
|
|
||||||
async function safelyReturnRocketeer( id, network ) {
|
async function safelyReturnRocketeer( id, network ) {
|
||||||
|
|
||||||
// // Chech if this is an illegal ID
|
// Chech if this is an illegal ID
|
||||||
// const invalidId = await isInvalidRocketeerId( id, network )
|
const invalidId = await isInvalidRocketeerId( id, network )
|
||||||
// if( invalidId ) throw invalidId
|
if( invalidId ) throw invalidId
|
||||||
|
|
||||||
// // Get old rocketeer if it exists
|
// Get old rocketeer if it exists
|
||||||
// const oldRocketeer = await getExistingRocketeer( id, network )
|
const oldRocketeer = await getExistingRocketeer( id, network )
|
||||||
// if( oldRocketeer ) return oldRocketeer
|
if( oldRocketeer ) return oldRocketeer
|
||||||
|
|
||||||
// If no old rocketeer exists, make a new one and save it
|
// If no old rocketeer exists, make a new one and save it
|
||||||
return generateRocketeer( id, network )
|
return generateRocketeer( id, network )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user