1.0.0 • Published 1 year ago

presence-card v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Install

npm install presence-card
# or
yarn add presence-card

Usage

OptionTypeDescription
usernameStringUsername that will be display to the presence-card.
userProfileStringUser profile that will be display to the presence-card. File format: PNG/JPEG
userStatusStringUser status that will be show to the presence-card. Example: Online, Idle, Dnd, and Offline
activityStringShow user activity to the presence card.
activityTypeStringShow user activity type to the presence card.

Code Usage

npm.io

Example

const { presenceCard } = require("presence-card");
const { AttachmentBuilder } = require("discord.js");

client.on("interactionCreate", async (message) => {
    
    const cardPresence = await presenceCard({
        username: client.user.username,
        userProfile: client.user.displayAvatarURL({ extension: 'png' }),
        userStatus: "online",
        activity: "shittybot.xyz | /help",
        activityType: "Listening",
      })

    const attachment = new AttachmentBuilder(cardPresence, {
        name: "card.png",
    });

    interaction.channel.send({
        files: [attachment],
    });
});

client.login("token");
1.0.0

1 year ago

0.0.1-alpha

1 year ago

0.0.0-alpha

1 year ago