1.0.1 • Published 3 years ago

tech-tip-cyber-test v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Tech

Contents

Installation

npm install tech-tip-cyber

Usages

Examples

ChatBot

  • Using Command
const { chatBot } = require('tech-tip-cyber') // Importing Package

module.exports = { // Change To Your Handler
    name: 'chat-bot',
    description: 'Chat With BOT',
    execute(message, args) { // Change To Your Handler
        const msg = args.join(' '); // For Text After `.chat-bot`
        if(!msg) return message.reply('Provide Text') // If No Text is Provided
        if(message.channel.id === '777919296595820564') { // Channel ID
        if(message.author.bot) return // If Bot Messages Then It Won't Reply
        if(message.channel.type === 'dm') return // If Message Is Sent In DMs Then It Won't Reply
        if(message.attachments.size > 0) return message.reply('I Can\`t read Images') // If Images Are Sent BOT Will Send This
        else {
            const reply = await chatBot({ Message: msg }); // Get The Message User Sent, Message: <msg>
            return message.channel.send(`> ${message}\n${reply}`); // Reply To User's Message
            }
        }
    }
}
  • Always On ChatBot
const { chatBot } = require('tech-tip-cyber') // Importing Package

client.on('message', async message => {
    if(message.channel.id === '777919296595820564') { // Channel ID
    if(message.author.bot) return // If Bot Messages Then It Won't Reply
    if(message.channel.type === 'dm') return // If Message Is Sent In DMs Then It Won't Reply
    if(message.attachments.size > 0) return message.reply('I Can\`t read Images') // If Images Are Sent BOT Will Send This
    else {
        const reply = await chatBot({ Message: message }); // Get The Message User Sent, Message: <message>
        return message.channel.send(`> ${message}\n${reply}`); // Reply To User's Message
        }
    }
})

Fetch Message

const { MessageAttachment } = require('discord.js') // Importing discord.js Package For Sending As Attachment
const { transcript } = require('tech-tip-cyber') // Importing Package

module.exports = { // Change To Your Handler
    name: 'fetch-messages',
    description: 'Fetch Messages From A Channel',
    execute(message, args) { // Change To Your Handler
        
        transcript(message, 10).then((data) => { // transcript(message, <10>) It Will Fetch 10 Messages From Channel, Can Be Any Number Less Than 100
            const file = new MessageAttachment(data, "fetched.html"); // Making Attachment File
            message.channel.send(file); // Send As Attachment
        });
    }
}

IP Address

const { ipAddress } = require('tech-tip-cyber') // Importing Package


module.exports = { // Change To Your Handler
    name: 'ip',
    description: 'Get Random IP Address',
    execute(message, args) { // Change To Your Handler
        message.channel.send(ipAddress()) // OutPut: 250.52.169.98, 165.215.159.165, 94.246.4.97
    }
}

Random Email

  • WithOut Personalized Domain
const randomMail = require('tech-tip-cyber') // Importing Package

module.exports = { // Change To Your Handler
    name: 'email',
    description: 'Get Random Email',
    execute(message, args) { // Change To Your Handler
        message.channel.send(randomMail()) // OutPut: gomec@rov.pfizer, go@rovnukel.ad, wuw@kiljo.cern
    }
}
  • With Personalized Domain
const randomMail = require('tech-tip-cyber') // Importing Package

module.exports = { // Change To Your Handler
    name: 'email',
    description: 'Get Random Email With Personalized Domain',
    execute(message, args) { // Change To Your Handler
        message.channel.send(randomMail({ domain: 'techtipcyber.com' })) // OutPut: lidlos@techtipcyber.com, wofaciavo@techtipcyber.com, vombecwi@techtipcyber.com
    }
}

Random PassWord

const { password } = require('tech-tip-cyber') // Importing Package

module.exports = { // Change To Your Handler
    name: 'pass',
    description: 'Get Random PassWord With Length Of PassWord',
    execute(message, args) { // Change To Your Handler
        message.channel.send(password(7)) // password(<7>) <7> Is Length Of PassWord // OutPut: Co1L5nE, fO8xkv5, XQJyapg
    }
}
1.0.1

3 years ago

1.0.0

3 years ago