1.0.1 • Published 2 years ago
tobzi.js v1.0.1
Temporary Channels
const Discord = require('discord.js')
const Client = new Discord.Client({
intents: [
'GuildVoiceStates'
]
})
const { JoinToCreate } = require('tobzi.js')
JoinToCreate(Client, {
ChannelId: '', // Required
CategoryId: '' // Required
})
ProBot Tax
const { ProTax } = require('tobzi.js')
console.log(ProTax('10k'))
Broadcast Creator
require('dotenv').config()
const Discord = require('discord.js')
const Client = new Discord.Client({
intents: [
'Guilds',
'GuildMessages',
'DirectMessages'
]
})
const { BroadcastCreator } = require('tobzi.js')
BroadcastCreator(Client, {
/* Required */
Token: process.env.Token, // Your Bot Token
LogChannelId: '', // Enter Here the Log Channel Id
OwnerId: [''], // Your Id
/* Not Required */
CommandDescription: '', // Custom Command Description
CommandName: '' // Custom Command Name
})
Handler Builder
const Discord = require('discord.js')
const Client = new Discord.Client({
intents: [
'Guilds'
]
})
const { HandlerBuilder } = require('tobzi.js')
const Commands = new Discord.Collection()
const App = new HandlerBuilder({
Client: Client, // Required
EventsDir: './Events', // Not Required
CmdDir: './Commands', // Not Required
CmdBuilder: './SlashCommand' // Not Required
})
App.LoadEvents(),
LoadCmd(),
LoadCmdBuilder()
/* Events */
// channelCreate
const { Client, GuildChannel } = require('discord.js')
/**
* @param { Client } Client
* @param { GuildChannel } Channel
*/
module.exports = async(Client, Channel) => {
const Log = await Channel.guild.channels.cache.get('')
Log.send({
content: `${Channel} has been Created;`
})
}
// SlashCommand
module.exports = {
name: 'ping',
description: 'Ping Speed',
run: async(Client, Interaction) => {
Interaction.reply({ content: `Ping ${Client.ws.ping}` })
}
}
// Commands
module.exports = {
name: 'ping',
run: async(Client, Message, Args) => {
Message.reply({ content: `Ping ${Client.ws.ping}` })
}
}
/*
NOTE > Events Files in TOBZiCoder for Final your Discord Bot
*/