2.0.9 • Published 1 year ago

@lvckyworld/marina-api v2.0.9

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

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);
        }
    }
}
2.0.9

1 year ago

2.0.8

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago