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
const WS_VER = process.env.WS_VER || '6'; | |
const WS_URL = `wss://gateway.discord.gg/?v=${WS_VER}&encoding=json`; | |
const WebSocket = require('ws'); | |
const EventEmitter = require('events'); | |
const debug = require('debug')('discord'); | |
const { payloads } = require('./payloads'); | |
const Client = module.exports = class extends EventEmitter { |
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
const date = require('date.js'); | |
const cheerio = require('cheerio'); | |
const { readFileSync } = require('fs'); | |
const html = readFileSync('active-popular.html', 'utf8'); | |
const parseFiction = ($, el) => ({ | |
image: $(el).find('img').attr('src'), | |
title: $(el).find('.fiction-title').children('a').text(), | |
id: $(el).find('.fiction-title').children('a').attr('href').split('/')[2], |
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
// TODO: This function is retarded, fix it and add actual humanization. | |
void humanize_hitpoints(int total, hitpoint **points, int level) | |
{ | |
if (!level) { | |
return; | |
} | |
int i, offset; | |
hitpoint *p = NULL; |
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
/* This is probably breaking RR rules or something. | |
* I didn't test this but it should work. | |
*/ | |
const { writeFileSync } = require('fs'); | |
const { RoyalRoadAPI } = require('@l1lly/royalroadl-api'); | |
const api = new RoyalRoadAPI(); | |
const args = process.argv.splice(2); |
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
javascript: (function() { | |
let domStyle = document.getElementById('domStylee'); | |
if (domStyle) { | |
document.body.removeChild(domStyle); | |
return; | |
} | |
domStyle = document.createElement("style"); | |
domStyle.setAttribute('id', 'domStylee'); | |
domStyle.append( | |
['* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }'], |
OlderNewer