Last active
March 13, 2021 22:18
-
-
Save identithree/618af55ea791f431e9002b6326246527 to your computer and use it in GitHub Desktop.
This is horrible bad code, but most importantly this is horrible bad code that should never be used
This file contains 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
if (args.includes('--show-banners')) { | |
console.log('\n THE PLUTO DISCORD BOT\n Written by Quinn Lane - https://brndnln.dev/ https://pluto.rip/\n') | |
console.log('\n List of all possible banners:\n') | |
banners.forEach(value => { | |
bannerPos = getArrayPos(value, banners) + 1 | |
console.log(` [${bannerPos.toString()} of ${banners.length}] ${value}:`) | |
if (args.includes('--rainbow') || args.includes('--gaytime')) { | |
rainbow(readFileSync(`./messages/banners/${value}.txt`, { encoding: 'utf-8' })) | |
} else { | |
console.log(readFileSync(`./messages/banners/${value}.txt`, { encoding: 'utf-8' })) | |
} | |
}) | |
process.exit(0) | |
} | |
if (args.includes('--banner')) { | |
argPos = getArrayPos('--banner', args) | |
if (!banners.includes(args[argPos + 1])) { | |
console.error('Error: That banner does not exist! To find a banner that does exist, use the --show-banners flag. Using random banner.\nList of banners:') | |
banners.forEach(value => { | |
console.log(` - ${value}`) | |
}) | |
// noinspection DuplicatedCode | |
if (args.includes('--rainbow') || args.includes('--gaytime')) { | |
rainbow(`\n${readFileSync(`./messages/banners/${banners[Math.floor(Math.random() * banners.length)]}.txt`, { encoding: 'utf-8' })}`) | |
rainbow('\n THE PLUTO DISCORD BOT\n Written by Quinn Lane - https://brndnln.dev/ https://pluto.rip/\n') | |
} else { | |
console.log(`\n${readFileSync(`./messages/banners/${banners[Math.floor(Math.random() * banners.length)]}.txt`, { encoding: 'utf-8' })}`) | |
console.log('\n THE PLUTO DISCORD BOT\n Written by Quinn Lane - https://brndnln.dev/ https://pluto.rip/\n') | |
} | |
} else { | |
// noinspection DuplicatedCode | |
if (args.includes('--rainbow') || args.includes('--gaytime')) { | |
rainbow(`\n${readFileSync(`./messages/banners/${args[argPos + 1]}.txt`, { encoding: 'utf-8' })}`) | |
rainbow('\n THE PLUTO DISCORD BOT\n Written by Quinn Lane - https://brndnln.dev/ https://pluto.rip/\n') | |
} else { | |
console.log(`\n${readFileSync(`./messages/banners/${args[argPos + 1]}.txt`, { encoding: 'utf-8' })}`) | |
console.log('\n THE PLUTO DISCORD BOT\n Written by Quinn Lane - https://brndnln.dev/ https://pluto.rip/\n') | |
} | |
} | |
} else { | |
// noinspection DuplicatedCode | |
if (args.includes('--rainbow') || args.includes('--gaytime')) { | |
rainbow(`\n${readFileSync(`./messages/banners/${banners[Math.floor(Math.random() * banners.length)]}.txt`, { encoding: 'utf-8' })}`) | |
rainbow('\n THE PLUTO DISCORD BOT\n Written by Quinn Lane - https://brndnln.dev/ https://pluto.rip/\n') | |
} else { | |
console.log(`\n${readFileSync(`./messages/banners/${banners[Math.floor(Math.random() * banners.length)]}.txt`, { encoding: 'utf-8' })}`) | |
console.log('\n THE PLUTO DISCORD BOT\n Written by Quinn Lane - https://brndnln.dev/ https://pluto.rip/\n') | |
} | |
} | |
if (args.includes('-h') || args.includes('--help')) { | |
console.log(readFileSync('./messages/help.txt', { encoding: 'utf-8' })) | |
process.exit(0) | |
} | |
if (!args.includes('--no-start')) { | |
log(loggerType.INFO, 'Starting bot... Please wait...') | |
Pluto() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment