Skip to content

Instantly share code, notes, and snippets.

View MrCrypticxDev's full-sized avatar
🐊
Nom nom nom

Matthew MrCrypticxDev

🐊
Nom nom nom
View GitHub Profile
@m1guelpf
m1guelpf / route.ts
Created May 26, 2023 04:18
Next.js App Route for getting the current playing song on Spotify (or a cached version)
import redis from '@/lib/redis'
import { tap } from '@/lib/utils'
import { NextResponse } from 'next/server'
import { NowPlaying } from '@/types/activities'
import { base64_encode, use } from '@/lib/utils'
type SpotifyResponse = {
is_playing: boolean
progress_ms: number
item: {
@GeneralSadaf
GeneralSadaf / List of Discord voice activities.md
Last active April 18, 2024 01:39
IDs of Discord voice activities.

Activities no longer require boosts to unlock. Activities except Watch Together are locked behind Nitro. Kept boost levels for prosperity.

Stable versions

Application ID Application name Boost level Max participants
755600276941176913 YouTube Together(Old) 0 Unlimited
880218394199220334 Watch Together(New) 0 Unlimited
755827207812677713 Poker Night 1 25
773336526917861400 Betrayal.io 0 Unlimited
814288819477020702 Fishington.io 0 Unlimited
832012774040141894 Chess In The Park 1 Unlimited
@advaith1
advaith1 / discordjs-slash-commands.md
Last active April 20, 2024 05:39
Slash Commands in Discord.js
@Allvaa
Allvaa / ExtendedMessage.js
Last active April 16, 2024 18:28
Discord.js v12 Inline Replies
const { APIMessage, Structures } = require("discord.js");
class ExtAPIMessage extends APIMessage {
resolveData() {
if (this.data) return this;
super.resolveData();
const allowedMentions = this.options.allowedMentions || this.target.client.options.allowedMentions || {};
if (allowedMentions.repliedUser !== undefined) {
if (this.data.allowed_mentions === undefined) this.data.allowed_mentions = {};
Object.assign(this.data.allowed_mentions, { replied_user: allowedMentions.repliedUser });