2.4.7 • Published 2 years ago

lewds.api v2.4.7

Weekly downloads
13
License
MIT
Repository
github
Last release
2 years ago

Lewds / Ahni / API

(Might be buggy still)

Installation

npm i lewds.api

how to use

const { LewdClient } = require('lewds.api');
const api = new LewdClient({ KEY: "Your-API-Key-Here" })

// NSFW Endpoints
api.nsfw("thighs").then(result => {
    console.log(result)
})

// Chat Endpoint
api.chat("MESSAGE%20CONTENT", "USERID").then(result => {
    console.log(result)
})

AutoUnmute + Mute system

Mutes and unmutes.

// index.js

const { Client } = require('discord.js'); const client = new Client({ intents: "GUILDS", "GUILD_MEMBERS"});// Not sure about guild_members..? const { LewdClient } = require('lewds.api'); const lewds = new LewdClient({ KEY: "Your-API-Key-Here" }) client.lewds = lewds;

client.lewds.connectToMongoDB("Your-mongoDB-URL-Here"); client.lewds.timed(client)// auto unmutes

// event when someones unmuted client.on("timedUnmute", (user, guild)=>{ console.log(${user.name} (${user.id}) was unmuted in ${guild.name} (${guild.id})) }) ...

```js
// mute.js
        ...
    /** member { Discord.User }
      * time { Number }
      * reason { String }
      */
    client.lewds.forced(member, time, reason)
        ...
// unmute.js
        ...
     /** 
      * client { Discord.Client }
      * user { Discord.User }
      */
    client.lewds.forced(client, user)
        ...

Quote Command.js

Quotes a message via a messageID from message channel or Message URL.

        ...              ...                 ...
                // QuoteCommand.js
client.lewds.quoteId(client, args[0], msg.channel).then(res => { 
// msg.channel (OR message.channel) is needed just the way it is unless you call the current channel differently.
const embed = new MessageEmbed()
    .setDescription(`\`\`\`${res.content}\`\`\``)
    .setTimestamp(res.createdAt)
    .setColor(res.author.accentColor || "WHITE")
    .setAuthor(res.author.username, res.author.avatarURL({ type: "png", dynamic: true, size: 4096 }), res.author.avatarURL({ type: "png", dynamic: true, size: 4096 }))
if (res.attachments && res.attachments.size > 0) {
    embed.setImage(res.attachments.first().url)
}
    console.log(res.content)
    msg.reply({ embeds: [embed] });
    });

... ... ...

```js
// Captcha system / event
const { LewdCaptcha } = require("lewds.api");
client.on("guildMemberAdd", (member) => {
    
// =============================================================================
    //  for captcha setup / sending.
    // channelID can be either a category OR a GUILD_TEXT/text-channel ;)
    const role = member.guild.roles.cache.get("xxxxxxxxxxxxxxxxx");
    const channel = member.guild.channels.fetch("xxxxxxxxxxxxxxxxx");
    new LewdCaptcha.Captcha(client, {channelID: channel.id, attempts: 3, caseSensitive: false}).present(member, role, channel);
// =============================================================================
    // For antiJoin raid checking: (WIP)
    new LewdCaptcha.Captcha(client).check(member, days, roleId, joinCount);
    // member = user
    // days = amount of days user has been registered for
    // roleId = mute/unverified roleId
    // joinCount = max amount of new joins before kicking this amount of users that joined recently. (the time frame is 6500ms [6~ seconds])
// =============================================================================

});

endpoints


|| NSFW ||

  • Just read Docs please...

|| SFW ||

  • chat

For an up to date list on endpoints visit lewds.fun | ahni.dev

For support join our discord

2.3.0

2 years ago

2.4.1

2 years ago

2.3.2

2 years ago

2.4.0

2 years ago

2.3.1

2 years ago

2.4.3

2 years ago

2.3.4

2 years ago

2.4.2

2 years ago

2.3.3

2 years ago

2.4.5

2 years ago

2.3.6

2 years ago

2.4.4

2 years ago

2.3.5

2 years ago

2.4.7

2 years ago

2.3.8

2 years ago

2.2.9

2 years ago

2.4.6

2 years ago

2.3.7

2 years ago

2.2.8

2 years ago

2.3.9

2 years ago

2.2.7

3 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.2.5

3 years ago

2.2.4

3 years ago

2.2.6

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.1.9

3 years ago

2.1.6

3 years ago

2.1.8

3 years ago

2.1.7

3 years ago

2.1.4

3 years ago

2.1.5

3 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago