1.0.8 • Published 2 years ago
discords.city v1.0.8
Discords.City
Discords City officially NPM Package to make it easier to develop Discords City API
⚙ Installation
npm install discords.city
📜 Example
- AutoPost Example A full working example can be found in example/index.js
const { Client } = require('discord.js');
const { DiscordsCity } = require('discords.city');
const myBot = new Client(/*{....}*/);
const discordsCity = new DiscordsCity("YOUR_DISCORDS_CITY_TOKEN", myBot);
myBot.login('YOUR_DISCORD_TOKEN');
discordsCity.autoPost((err, data) =>
{
if (err)
{
console.error(err);
}
else
{
console.log('Discords City Status Updated.');
}
});
myBot.on('ready', () =>
{
console.log('I am ready!');
});
- Widget Example
const { Widget } = require('discords.city');
const myWidget = new Widget();
const widgetUrl = myWidget.generateUrl('user' /* Widget Type */, 'YOUR_DISCORD_ID', 'YOUR_WIDGET_THEME'); // Theme is an optional argument.
console.log(widgetUrl); // ex. https://api.discords.city/api/v1/user/widget/theme-1/488958506280550402
✨ Features
- Post your bot guilds count to Discords City api Automaticly
- Get your User/Bot/Guild Widget
📃 Documents
There is not much to say at the moment, but you will be able to pass an optional object for more functionality such as Interval timer, and more.
const options =
{
interval: 300000, // Interval timer in miliseconds
postOnStart: true // or false, Automaticly post data whenever the client is ready.
}
const discordsCity = new DiscordsCity("YOUR_DISCORDS_CITY_TOKEN", myBot, options);
MIT License
1.0.8
2 years ago
1.0.7
2 years ago
1.0.5
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago