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) { |
TheRealToxicDev / Config Validation
0 likes
0 forks
1 files
Last active
Validate the bots config values
1 | const config = require('../configs/main.config'); |
2 | |
3 | module.exports.configCheck = async function({ client }) { |
4 | |
5 | if (!config.Discord.Tokens.main || config.Discord.Tokens.main == '') { |
6 | |
7 | await client.logger('Please provide a valid production token.', { |
8 | header: 'INVALID_CONFIG', |
9 | type: 'error' |
10 | }); |
TheRealToxicDev / Guild Member Add Event
0 likes
0 forks
1 files
Last active
Guild member add event for discord bot using discord.js v14.12.1
1 | module.exports = { |
2 | name: 'guildMemberAdd', |
3 | once: false, |
4 | |
5 | async execute(member, client) { |
6 | |
7 | if (!member.guild.id === '') return; // Ignore the event if triggering guild is not the support guild |
8 | |
9 | try { |
TheRealToxicDev / Team Acks
0 likes
0 forks
1 files
Last active
Kinda pointless function that checks a user staff roles and adds them to an array to be used in commands for enfinity
1 | module.exports.getTeamAcks = async function ({ client, guildId, userId }) { |
2 | |
3 | let guild = await client.guilds.cache.get(guildId); |
4 | let user = await guild.members.cache.get(userId); |
5 | |
6 | /** |
7 | * DEFINE TEAM ACKS |
8 | */ |
9 | |
10 | let teamAcks = []; |
Newer
Older