About
Luco is Api made for connecting your bot with our website.
It is free to use, very simple, and make you connect with our api easily with just few steps.
Luco had many examples and functions like information, votes and more in future.
Features
- very simple and easy to use.
- faster and have many options to use.
- Support to help you in our discord server 24/7.
- many functions to use with powerful optimization.
How it Work
Luco check the api if any user vote to your bot in our website every 1m and send that message to channel that you choose and done that simple.
Installation
npm i luco
Setup
Setup your luco by just few steps :
const { Client } = require('discord.js');
const client = new Client(); // Your Discord Client
const { lucoBot } = require('luco');
const vote = new lucoBot.Vote({
client: client,
id: "YOUR DISCORD BOT ID",
token: "YOUR DISCORD BOT TOKEN IN LIST",
channel: 'CHANNEL ID TO SEND THE MESSAGE',
message: `{user_name} vote {bot_name} now is {count}`,
reward: (client, userId) => {
//CODE
}
});
{user_id}
The user Id.{user_name}
The user name ( without mention ).{bot_id}
Your bot Id.{bot_name}
Your bot name ( without mention ).{count}
All your bot votes count.
Parameters
Name | Description | type | required |
---|---|---|---|
client | Your discord client. | discord client | true |
id | Your discord bot ID. | String | true |
token | Your discord bot token in our list. | String | true |
channel | Your channel ID that the message will be send. | String | true |
message | Your message that will be send. | String or Object | true |
reward | The reward when user vote to the bot. | Function | false |
displayLog | display connect log on console | bolean | false |
Advance Usage (message)
You can use discord Embeds by message object:
const vote = new lucoBot.Vote({
client: client,
id: "YOUR DISCORD BOT ID",
token: "YOUR DISCORD BOT TOKEN IN LIST",
channel: 'CHANNEL ID TO SEND THE MESSAGE',
message: {
content: `{user_name} vote {bot_name} now is {count}`,
embeds: []
},
reward: (client, userId) => {
//CODE
}
});
You can check Message Components or Embeds on discord guide for more information.
:warning: If you are using embeds: be carefully the
{user_id}
or{user_name}
,{bot_id}
or{bot_name}
and{count}
will work in embed Description only.
Help
Any errors or problems you encounter while using luco, we will be happy to assist you our discord server
License
Luco is licensed under the Apache License 2.0.