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 / interactions.ts

0 likes
0 forks
1 files
Last active 1 month ago
1 import { Interaction, ChatInputCommandInteraction, ButtonInteraction, TextChannel, StringSelectMenuInteraction } from "discord.js";
2 import { handleButton, handleScoreSubmitButton } from "@handlers/buttons";
3 import { handleTgCommand } from "@commands/tg";
4 import { handleTgConfigCommand } from "@commands/tgConfig";
5 import { handleBorrowAcceptButton } from "@subcommands/char/accept";
6 import { handleBorrowDeclineButton } from "@subcommands/char/decline";
7 import { handleConflictButton } from "@systems/conflict";
8 import { handleImpersonateButton } from "@subcommands/impersonate";
9 import { handleAutocomplete } from "@handlers/autocomplete";
10 import { setActiveCharacter, getCharacterByName, getCharacters } from "@systems/characters";

nuno / switch.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 { resolveUser, hasOfficerRole } from "@systems/users";
4 import { setActiveCharacter, getActiveCharacter, getCharacterByName, getCharacters } from "@systems/characters";
5 import {
6 getEffectiveCharacter,
7 setSessionBorrow,
8 setPersistentPreference,
9 clearPersistentPreference,
10 clearSessionBorrowForUser,

nuno / schema.php

0 likes
0 forks
1 files
Last active 1 month ago
1 /**
2 * This is the model class for table "{{%building_type}}".
3 *
4 * @property int $id
5 * @property string|null $guid
6 * @property string $name
7 * @property int|null $public_use
8 * @property int|null $status
9 * @property int|null $record_status
10 * @property int|null $position

nuno / buttons.ts

0 likes
0 forks
1 files
Last active 1 month 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 / 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 "@src/types";
10 import { cfg } from "@systems/config";

nuno / inject.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 { getEffectiveCharacter } from "../../systems/borrow";
5 import { nowFormatted, resolveMessage } from "../../systems/messages";
6 import { replyAndDelete } from "../../utils";
7 import { VoteEntry } from "../../types";
8
9 export async function handleInject(interaction: ChatInputCommandInteraction): Promise<void> {
10 const userKey = interaction.options.getString("name", true);

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 / 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 "@src/types";
10 import { cfg } from "@systems/config";

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 { getEmoji } from "@systems/emojis";
5 import { replyAndDelete } from "@utils";
6
7 export async function handleRankPost(interaction: ChatInputCommandInteraction): Promise<void> {
8 const week = getCurrentWeek();
9 const goal = cfg("wRankGoal");
10 const weekKey = getWeekKey();

nuno / emojis.ts

0 likes
0 forks
1 files
Last active 1 month ago
1 import fs from "fs";
2 import path from "path";
3 import { EmojiMap, ClassKey } from "../types";
4
5 const EMOJI_PATH = path.join(__dirname, "../../messages/emojis.json");
6 let _emojis: EmojiMap = {};
7
8 export function loadEmojis(): void {
9 try { _emojis = JSON.parse(fs.readFileSync(EMOJI_PATH, "utf8")); }
10 catch (err) { console.error("Failed to load emojis.json:", err); _emojis = {}; }
Newer Older

Powered by Opengist ⋅ Load: 113ms⋅

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