🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@lvckyworld/marina-api

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lvckyworld/marina-api

Marina API SDK for Node.js

latest
Source
npmnpm
Version
2.0.9
Version published
Maintainers
2
Created
Source

Marina API SDK

Latest Release
Banner
Docs

Website Discord
The official MarinaAPI as NPM-Package

Install the Package

First you need to install the package using npm

npm install @lvckyworld/marina-api

Import the Package

TypeScript

import {MarinaAPI} from "@lvckyworld/marina-api"

JavaScript

const {MarinaAPI} = require("@lvckyworld/marina-api");

Usage Example

import {MarinaAPI} from "@lvckyworld/marina-api"; // added
import {Message} from "discord.js";
import {LeaveSeverPCommand} from "./module/LeaveSeverPCommand";

export class MessageListener {
    public static async onMessage(message: Message) {
        const prefix = ".";
        if (message.author.bot) return;
        if (!message.content.startsWith(prefix)) return;
        const command = message.content.toLowerCase().slice(prefix.length).split(" ")[0];
        const args = message.content.slice(prefix.length).split(" ").slice(1);

        if (command === "leave") {
            if (!await MarinaAPI.isLvckyWorldAdmin(message.author.id)) return; // added
            new LeaveSeverPCommand().execute(message, args);
        }
    }
}

FAQs

Package last updated on 20 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts