Skip to content

Instantly share code, notes, and snippets.

View Sans3108's full-sized avatar

Sans Sans3108

  • 11:05 (UTC +03:00)
View GitHub Profile
// Utils
type Quality = 'Normal' | 'Uncommon' | 'Rare' | 'Epic' | 'Legendary';
const ThrusterConsumption: Record<Quality, number> = {
Normal: 120,
Uncommon: 156,
Rare: 192,
Epic: 228,
Legendary: 300
};

Terms of Service

1. Acceptance of Terms

By using Crystal ("the Bot"), you agree to comply with and be bound by the following terms and conditions ("Terms of Service"). If you do not agree to these terms, please do not use the Bot.

2. Description of Service

The Bot provides access to DDNet data about players, maps, and other related information. These services are provided "as is" and are subject to change without notice.

3. Usage Guidelines

  • Users must comply with Discord's Terms of Service and Community Guidelines while using the Bot.

Privacy Policy

1. Introduction

This Privacy Policy explains how Crystal ("the Bot") collects, uses, stores, and protects your data. By using the Bot, you agree to the collection and use of information in accordance with this policy.

2. Data Collection

Crystal collects the following data:

  • DDNet Username: This is optional and is used to provide player-specific information or to facilitate easier use of the Bot by avoiding repeated entry of your name in commands. You may choose not to provide this information, or you may remove it at any time.

3. Data Usage

@Sans3108
Sans3108 / cards.ts
Created April 14, 2024 15:48
Cards
import { randomInt } from 'crypto';
type DeepRequired<T extends object> = Required<{
[P in keyof T]: T[P] extends object | undefined ? DeepRequired<Required<T[P]>> : T[P];
}>;
enum CardSuit {
hearts = '♥',
diamonds = '♦',
clubs = '♣',
import { BaseExtractor, ExtractorInfo, ExtractorSearchContext, Playlist, QueryType, SearchQueryType, Track, Util } from 'discord-player';
import SoundCloud from 'soundcloud.ts';
//@ts-ignore Idk why but it doesnt work if I just do `new SoundCloud()`
const soundcloud: SoundCloud = new SoundCloud.default();
export class SoundCloudExtractor extends BaseExtractor {
public static identifier = 'apiBasedSoundCloudExtractor' as const;
public async validate(query: string, type?: SearchQueryType | null | undefined): Promise<boolean> {