This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type RecursiveStringArray = (RecursiveStringArray | string)[]; | |
export type DeconstructedFunction = { args: (string | string[])[], body: string, wrapScope: boolean, wrapArgs: boolean; isAsync: boolean; }; | |
export function guildEvalParser<R, A extends never[]>(func: string | ((...args: A) => R)): string { | |
if (typeof func === 'function') func = func.toString(); | |
const type: 'function' | 'arrow' = (func.startsWith('function') || func.startsWith('async function')) ? 'function' : 'arrow'; | |
if (type === 'function') func = func.replace(/function\s+\w+\s*/, 'function '); | |
const data = getStuff({ func, type }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type PusherEvents = { | |
// 'channel.id'; | |
channel: { | |
FollowersUpdated: { | |
followersCount: string | number | |
channel_id: number | |
username: unknown | |
created_at: number | |
followed: boolean | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const https = require(`node:https`); | |
const fs = require(`node:fs`); | |
const config = { | |
token: ``, | |
fetchAll: true, // Fetch all files or just specific number | |
downloadFromDomain: null, // null or cdn.something.com | |
sortByMonth: true // would you like sort files by month | |
}; | |
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const channel = require('./channel'); | |
const https = require('https'); | |
const fs = require('fs'); | |
/* | |
I am not responsible if you damage any account, this is for educational purposes only. | |
Steps: | |
- You will have to use https://github.com/Tyrrrz/DiscordChatExporter to get channels.json file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Discord = require('discord.js'); | |
const config = { | |
token: ``, // your discord bot token, get it from https://discordapp.com/developers/applications/me | |
leaveIfMoreThen5: false, // would you like to leave guilds if same owner owns more then 5 of them? | |
}; | |
const client = new Discord.Client({ | |
intents: Discord.GatewayIntentBits.Guilds, | |
}); |