Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Latest commit

 

History

History
46 lines (31 loc) · 1.15 KB

introduction.mdx

File metadata and controls

46 lines (31 loc) · 1.15 KB
title description
Introduction
Simo-API is a working tool for developers related to the Simo project. Allows you to add, edit, delete, and get information about something, like a bot.

Libraries

You can interact with the API in different ways instead of using the raw API. Using API wrappers makes it easier to interact with the actual API.

@simo.js/rest

With @simo.js/rest, you can create and interact with the Simo API in a better way.

Getting the current user:

const { REST, Routes } = require("@simo.js/rest");

const rest = new REST({ auth: "API-AUTH" });

const userData = await rest.get(Routes.getUser("@me"));

console.log("Username:", userData.username);

@simo.js/simo.js

A powerful library that allows you to interact with any route and method of the Simo API.

Creating a bot:

const { API } = require("@simo.js/simo.js");

const client = new API({
    auth: "API-AUTH",
});

await client.bots.create({
    invite_url: "bot-invite",
    short_description: "Some short description goes here",
    long_description: "Some looooong description goes here...",
    prefixes: ["s!", "s?"],
    tags: ["economy"],
});