TheRealToxicDev / User Warnings
0 likes
0 forks
1 files
Last active
Handles how many warns a user can have.
1 | if (cases && cases.length >= 3) return enfinity.interaction.guild.bans.create(member.user.id, { |
2 | reason: 'User has exceeded our allowed maximum of 3 warnings' |
3 | }).then(async banned => { |
4 | await log.send({ |
5 | embeds: [ |
6 | new enfinity.Gateway.EmbedBuilder() |
7 | .setTitle('Action: ban user') |
8 | .setColor(enfinity.colors.base) |
9 | .setThumbnail(enfinity.logo) |
10 | .setDescription('Whoops, someone messed up and got the bean') |
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') |
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.', |