All New

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Register

Login

All New Register Login

nuno

Joined 4 months ago

Recently created
Least recently created
Recently updated
Least recently updated
All gists 582

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 import {
2 ButtonInteraction,
3 StringSelectMenuBuilder,
4 StringSelectMenuOptionBuilder,
5 ActionRowBuilder,
6 TextChannel
7 } from "discord.js";
8 import { cfg } from "@systems/config";
9 import { pollReplyAndDelete } from "../utils";
10 import { resolveUser } from "@systems/users";

nuno / scores.ts

0 likes
0 forks
1 files
Last active 3 months ago
1 import { TGScore, Nation, ClassKey } from "../types";
2 import { cfg } from "./config";
3 import { upsertScore, todayString } from "./history";
4 import { recordScore } from "./wrank";
5
6 // Normalize a slot string to a 24h integer hour
7 // Accepts: "20", "8", "8pm", "20:00", "midnight", "midday", "noon"
8 export function normalizeSlot(input: string): number | null {
9 const s = input.trim().toLowerCase();
10 if (s === "midnight") return 0;

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 {
2 "2026-W23": {
3 "weekKey": "2026-W23",
4 "entries": {
5 "capella": [
6 {
7 "userKey": "zephyr",
8 "characterName": "XefronYokuda",
9 "class": "FA",
10 "nation": "Capella",

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 {
2 "2026-W23": {
3 "weekKey": "2026-W23",
4 "entries": {
5 "capella": [
6 {
7 "userKey": "zephyr",
8 "characterName": "XefronYokuda",
9 "class": "FA",
10 "nation": "Capella",

nuno / wrank.json before TG

0 likes
0 forks
1 files
Last active 3 months ago
1 {
2 "2026-W23": {
3 "weekKey": "2026-W23",
4 "entries": {
5 "capella": [
6 {
7 "userKey": "zephyr",
8 "characterName": "XefronYokuda",
9 "class": "FA",
10 "nation": "Capella",

nuno / wrank.json before TG (delta changed, score didnt)

0 likes
0 forks
1 files
Last active 3 months ago
1 {
2 "2026-W23": {
3 "weekKey": "2026-W23",
4 "entries": {
5 "capella": [
6 {
7 "userKey": "zephyr",
8 "characterName": "XefronYokuda",
9 "class": "FA",
10 "nation": "Capella",

nuno / wrank.json after TG

0 likes
0 forks
1 files
Last active 3 months ago
1 {
2 "2026-W23": {
3 "weekKey": "2026-W23",
4 "entries": {
5 "capella": [
6 {
7 "userKey": "zephyr",
8 "characterName": "XefronYokuda",
9 "class": "FA",
10 "nation": "Capella",

nuno / wrank,ts

0 likes
0 forks
1 files
Last active 3 months ago
1 import fs from "fs";
2 import path from "path";
3 import { WRankData, WRankWeek, WRankEntry, Nation, ClassKey } from "../types";
4 import { cfg } from "./config";
5
6 const WRANK_PATH = path.join(__dirname, "../../data/wrank.json");
7 let _data: WRankData = {};
8
9 export function loadWRank(): void {
10 try { _data = JSON.parse(fs.readFileSync(WRANK_PATH, "utf8")); }

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 "capella": [
2 {
3 "userKey": "zephyr",
4 "characterName": "XefronYokuda",
5 "class": "FA",
6 "nation": "Capella",
7 "weeklyPoints": 2867,
8 "tgCount": 5,
9 "currentRank": 4,
10 "previousRank": 4

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 function formatCharRow(entry: VoteEntry, showNationEmoji = false): string {
2 const cfgFormat = cfg("charDisplayFormat");
3 const nation = entry.characterNation;
4 const wRankEntry = entry.characterName ? getEntry(entry.characterName, nation ?? "Capella") : null;
5
6 let wrank = "";
7 if (wRankEntry) {
8 const wRankGoal = cfg("wRankGoal");
9 wrank = format.wrank.full(wRankEntry, { goal: wRankGoal, brackets: true });
10 }
Newer Older

Powered by Opengist ⋅ Load: 116ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ KrilHub