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

All gists

Recently created
Least recently created
Recently updated
Least recently updated

nuno / emojis.json

0 likes
0 forks
1 files
Last active 1 month ago
1 {
2 "capella": "<:capella:1511020911027814453>",
3 "procyon": "<:procyon:1511020943323955301>",
4 "bl": "<:bl:1511014332685881364>",
5 "fb": "<:fb:1511020923510194428>",
6 "fs": "<:fs:1511020931542417459>",
7 "fa": "<:fa:1511020918929887434>",
8 "fg": "<:fg:1511020927461097482>",
9 "gl": "<:gl:1511020935463833711>",
10 "dm": "<:dm:1511020914974658612>",

nuno / post.ts

0 likes
0 forks
1 files
Last active 1 month ago
1 import { ChatInputCommandInteraction, TextChannel, EmbedBuilder } from "discord.js";
2 import { cfg } from "../../systems/config";
3 import { getCurrentWeek, getWeekKey, getBringer } from "../../systems/wrank";
4 import { replyAndDelete } from "../../utils";
5
6 export async function handleRankPost(interaction: ChatInputCommandInteraction): Promise<void> {
7 const week = getCurrentWeek();
8 const goal = cfg("wRankGoal");
9 const weekKey = getWeekKey();

nuno / wrank.ts

0 likes
0 forks
1 files
Last active 1 month 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 / lock.ts

0 likes
0 forks
1 files
Last active 1 month ago
1 import { ChatInputCommandInteraction, TextChannel } from "discord.js";
2 import { cfg } from "@systems/config";
3 import { polls, lockPoll, updatePollMessage } from "@systems/poll";
4 import { replyAndDelete } from "@utils";
5
6 export async function handleLock(interaction: ChatInputCommandInteraction): Promise<void> {
7 const oneTimeMsg = interaction.options.getString("message") ?? undefined;
8 const simulateClose = interaction.options.getBoolean("simulate_close") ?? false;
9 const slot = getActiveSlot();
10 if (slot === undefined) return void replyAndDelete(interaction, "❌ No active poll found.");

nuno / lock.ts

0 likes
0 forks
1 files
Last active 1 month ago
1 import { ChatInputCommandInteraction, TextChannel } from "discord.js";
2 import { cfg } from "../../systems/config";
3 import { polls, updatePollMessage } from "../../systems/poll";
4 import { replyAndDelete } from "../../utils";
5
6 export async function handleLock(interaction: ChatInputCommandInteraction): Promise<void> {
7 const oneTimeMsg = interaction.options.getString("message") ?? undefined;
8 const slot = getActiveSlot();
9 if (!slot) return void replyAndDelete(interaction, "❌ No active poll found.");

nuno / poll.ts

0 likes
0 forks
1 files
Last active 1 month ago
1 import {
2 EmbedBuilder,
3 ButtonBuilder,
4 ButtonStyle,
5 ActionRowBuilder,
6 TextChannel,
7 GuildMember,
8 } from "discord.js";
9 import { PollState, VoteEntry, Nation, TGSlot } from "../types";
10 import { cfg } from "./config";

nuno / slots.ts

0 likes
0 forks
1 files
Last active 1 month ago
1 import cron from "node-cron";
2 import { Client } from "discord.js";
3 import { cfg } from "./config";
4 import { TGSlot } from "../types";
5
6 type PollCallback = (slot: TGSlot) => Promise<void>;
7 type CloseCallback = (slot: TGSlot) => Promise<void>;
8
9 let _scheduledTasks: cron.ScheduledTask[] = [];

nuno / index.ts

0 likes
0 forks
1 files
Last active 1 month ago
1 import { Client, GatewayIntentBits, REST, Routes } from "discord.js";
2 import { loadConfig, cfg } from "@systems/config";
3 import { loadMessages } from "@systems/messages";
4 import { loadEmojis } from "@systems/emojis";
5 import { loadCharacters } from "@systems/characters";
6 import { loadWRank } from "@systems/wrank";
7 import { scheduleSlots } from "@systems/slots";
8 import { postPoll, polls, lockPoll, updatePollMessage } from "@systems/poll";
9 import { handleInteraction } from "@handlers/interactions";
10 import { buildTgCommand } from "@commands/tg";

nuno / format.ts

0 likes
0 forks
1 files
Last active 1 month ago
1 import { ClassKey, Nation } from "@src/types";
2 import { getClassEmoji, getNationEmoji, getEmoji } from "@systems/emojis";
3
4 // ─── Individual formatters ────────────────────────────────────────────────────
5
6 export interface CharDisplayOptions {
7 emoji?: boolean; // show class emoji (default: true)
8 level?: boolean; // show level (default: true)
9 }

nuno / set.ts

0 likes
0 forks
1 files
Last active 1 month ago
1 import { ChatInputCommandInteraction } from "discord.js";
2 import { cfg } from "@systems/config";
3 import { resolveUser, hasOfficerRole } from "@systems/users";
4 import { submitScore, detectSlot, normalizeSlot } from "@systems/scores";
5 import { getEffectiveCharacter } from "@systems/borrow";
6 import { replyAndDelete } from "@utils";
7 import { getEmoji } from "@systems/emojis";
8
9 export async function handleScoreSet(interaction: ChatInputCommandInteraction): Promise<void> {
10 const member = await interaction.guild!.members.fetch(interaction.user.id);
Newer Older

Powered by Opengist ⋅ Load: 83ms⋅

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