TheRealToxicDev / Request handler
0 likes
0 forks
1 files
Last active
1 | private _fetchURL() { |
2 | const startPing: number = Date.now(); |
3 | const timeout: Promise<Error> = new Promise((_, reject) => { |
4 | setTimeout(() => { |
5 | reject(new Error('timeout')) |
6 | }, this.timeout); |
7 | }); |
8 | |
9 | const fetchFunction = new Promise((resolve, reject) => { |
10 | fetch(this.url, { headers: this.headers }) |
TheRealToxicDev / Nextjs API | Image Upload
0 likes
0 forks
1 files
Last active
Nextjs based api used to upload images to your public directory.
1 | import cordxConfig from '@/configurations/cordx.config' |
2 | import dirSize from '@/utils/functions/dirSize' |
3 | import makeId from '@/utils/functions/makeId' |
4 | import sqlQuery from '@/utils/functions/sqlQuery' |
5 | import webhook from '@/utils/functions/webhook' |
6 | import { Request, Response } from 'express' |
7 | import Formidable from 'formidable-serverless' |
8 | const fs = require('fs') |
9 | |
10 | export const config = { |
TheRealToxicDev / Post Bot Stats
0 likes
0 forks
1 files
Last active
I mean title is kinda self explanatory
1 | /** |
2 | * POST YOUR BOTS STATS |
3 | * @param apiKey Your bots infinity api token found in your bot settings |
4 | * @param botID Your bots discord id. Can be found on the discord dev portal |
5 | * @requires servers The user count of your bot/client. |
6 | * @requires shards |
7 | * @requires users |
8 | */ |
9 | public async postBotStats(servers?: Bot, shards?: Bot, users?: Bot) { |
TheRealToxicDev / Enfinity | Verification Server | Member Join
0 likes
0 forks
1 files
Last active
Event that handles a new bot or user joining our verification server.
1 | }else if (member.guild.id === enfinity.config.guilds.test) { |
2 | |
3 | let audits = await member.guild.cahnnels.cache.find((c) => c.id === '870952646788390918'); |
4 | let staff = await member.guild.roles.cache.find((r) => r.id === '870952645811134480'); |
5 | const username = member.user.globalName ? member.user.globalName : member.user.username |
6 | |
7 | if (!member.user.bot) return audits.send({ |
8 | embeds: [ |
9 | new enfinity.Gateway.EmbedBuilder() |
10 | .setTitle('A new user has arrived') |
rootspring / genericcleaner.rs
0 likes
0 forks
1 files
Last active
1 | use std::str::FromStr; |
2 | |
3 | use futures_util::StreamExt; |
4 | use log::{info, warn}; |
5 | use sqlx::Row; |
6 | use strum::VariantNames; |
7 | use strum_macros::{EnumVariantNames, EnumString}; |
8 | |
9 | #[derive(EnumVariantNames, EnumString)] |
10 | enum Entity { |
TheRealToxicDev / Cordx Bot Profile Command
0 likes
0 forks
1 files
Last active
Command for checking a user's cordx profile!
1 | module.exports = { |
2 | name: 'profile', |
3 | category: 'Sharex', |
4 | description: 'View your cordx profile/information', |
5 | userPerms: [''], |
6 | basePerms: [''], |
7 | options: [ |
8 | { |
9 | name: 'user', |
10 | description: 'Leave empty to fetch your own profile.', |
rootspring / frontend.svelte
1 likes
0 forks
1 files
Last active
1 | <script lang="ts"> |
2 | import ButtonReact from "$lib/components/ButtonReact.svelte"; |
3 | import GreyText from "$lib/components/GreyText.svelte"; |
4 | import InputNumber from "$lib/components/InputNumber.svelte"; |
5 | import InputSm from "$lib/components/InputSm.svelte"; |
6 | import MultiInput from "$lib/components/MultiInput.svelte"; |
7 | import KvMultiInput from "$lib/components/KVMultiInput.svelte"; |
8 | import Select from "$lib/components/Select.svelte"; |
9 | import DeployWebhook from "./DeployWebhook.svelte"; |
10 | import type { Data } from "./dpsettings"; |
TheRealToxicDev / Stream Function
0 likes
0 forks
1 files
Last active
Used to stream or download a users sharex config
1 | import newSqlQuery from '@/utils/functions/sqlQuery'; |
2 | import { downloadStream, readStream } from '@/utils/functions/readStream'; |
3 | const fs = require('fs'); |
4 | |
5 | /** |
6 | * API ROUTE FOR VIEWING OR DOWNLOADING |
7 | * A USERS SHAREX CONFIG BASED ON THEIR ID |
8 | */ |
9 | export default async function handler(req, res) { |