@azurystudio/dbl-azury

1.0.5 • Public • Published

Installation

If you have trouble with the installation, please feel free to visit our discord.

  • npm i @azurystudio/dbl-azury

Welcome to the fresh and new Azury DBL!

We have lots of things updated in this version for simplicity and the sake of easiness!
There will be update logs at the bottom of the page! Check it out!

How to use this NPM Package

You may be a new user of this package and you just added your bot to Azury DBL! Well just in luck, we have a tutorial for most features!

My server count is N/A. How do i resolve that?

Ans:

const azury = require("@azurystudio/dbl-azury");
// Not your discord token, your DBL bot token, go on the edit page of your bot and copy and paste it!
const dbl = new azury("TOKEN-HERE", client);
// Your Token is most usable when approved!

client.on(Events.ClientReady, async () => {
  dbl.activate("servercount"); //Don't worry its not cap sensitive! You just need to get the letters correct!
 // Note! You can also add a additional message like dbl.activate("servercount", "posted successfully!");

I want to make a certain feature of my bot vote only? How can i do this?

Ans:

let hasVote = await dbl.activate("hasvoted", "userId"); //Its not CAP Sensitive but always check your spelling!
  if(hasVote === true) {
    console.log("Voted")
  } else {
    console.log("Vote please.")
  }

How do i access my vote count?

Ans:

dbl.activate("searchbot", "your-bot-id").then((json) => {

console.log(json.votes)
	
})
Output:
Int which has the votes

How do i search for a server or a user?

Ans:

// SearchUser

let user = await dbl.activate("searchuser", "user-id") // This user-id must have logged in before in the website or it will show an error

console.log(user);

// SearchServer

let server = await dbl.activate("searchserver", "server-id") // This is for servers that are available on the servers page or it will show an error.


console.log(server);

How do i view any of the announcements on a bot?

Ans:

let latestann = await dbl.activate("viewannouncements", "bot-id-of-your-choice") /* optional: page number. await dbl.activate(viewannouncements", "bot-id-of-your-choice", page-number) Must be a Int! 
1 announcement is shown per page and sort style is by the latest announcement to the earliest announcement made. */

console.log(latestann);

All in One:

const azury = require("@azurystudio/dbl-azury");
const dbl = new azury("TOKEN-HERE", client);

client.on("ready", async () => {
  dbl.activate("servercount");
  console.log("Server count posted")
  
  let hasVote = await dbl.activate("hasvoted", "userId");
  if(hasVote === true) {
    console.log("Voted")
  } else {
    console.log("Vote please.")
  }
  
  
  let search = await dbl.activate("searchbot", "bot-id")
  console.log(search)
  

  /* SearchResults
  {
    avatar: '',
    botID: '',
    username: '',
    discrim: '',
    shortDesc: '',
    prefix: '? [changable]',
    votes: Int,
    ownerID: '',
    owner: '',
    coowners: [ '' ],
    tags: [ 'Moderation', 'NSFW', 'Music' ],
    longDesc: longDesc,
    certificate: 'Certified'
  }
  */

 
// SearchUser

let user = await dbl.activate("searchuser", "user-id") // This user-id must have logged in before in the website or it will show an error

console.log(user);

// SearchServer

let server = await dbl.activate("searchserver", "server-id") // This is for servers that are available on the servers page or it will show an error.


console.log(server);

let latestann = await dbl.activate("viewannouncements", "bot-id-of-your-choice") /* optional: page number. await dbl.activate(viewannouncements", "bot-id-of-your-choice", page-number) Must be a Int! 
1 announcement is shown per page and sort style is by the latest announcement to the earliest announcement made. */

console.log(latestann);


});

Try it out yourself and see the results! How to install on top!

Change Logs

1.0.5

Readme improvements, you may use continue using 1.0.4 unless deprecated.

1.0.4

One feature added to activate viewannouncements

Example

dbl.activate("viewannouncements", "bot-id-of-your-choice") /* optional: page number.
dbl.activate(viewannouncements", "bot-id-of-your-choice", page-number) // Must be a Int!

1 announcement is shown per page and sort style is by the latest announcement to the earliest announcement made. *\

1.0.3

Deprecated

Use 1.0.4 (If not deprecated!) or later versions

This version adds 2 more features to the activate function and a new function the debug command.

The two features are:

searchserver searchuser Additional changes: search will no longer be search, it will be searchbot. Old:

dbl.activate("search", "bot-id");

New:

dbl.activate("searchbot", "bot-id");

The new features are self explainatory and easy to use.

For example

// SearchUser

dbl.activate("searchuser", "user-id") // This user-id must have logged in before in the website or it will show an error

// SearchServer

dbl.activate("searchserver", "server-id") // This is for servers that are available on the servers page or it will show an error.

New function - debug

This command allows you to debug and see if everything is working right!

dbl.debug(true) // this will show debug on the console. You can deactivate this by writing false or removing the function entirely.

Thats wraps up all the features added in this update.

1.0.2

Deprecated

Use 1.0.4 (If not deprecated!) or later versions

Adding more content to readme, soon they will be more features added into this version. Once actual features come out, previous versions will become deprecated!

1.0.1

Deprecated

Use 1.0.4 (If not deprecated!) or later versions

Improving ReadMe.md

1.0.0

Deprecated

Use 1.0.4 (If not deprecated!) or later versions

Alot has changed in this version since the previous one. Instead of you using dbl.funcionName, we now use activate, which allows you to use any of the functions all in one function.

Old:

dbl.hasVoted("user-id");

New:

dbl.activate("hasvoted", "user-id"); // Not cap sensitive so HASVOTED or hAsVoted works!

© Azury Studios

Package Sidebar

Install

npm i @azurystudio/dbl-azury

Weekly Downloads

3

Version

1.0.5

License

MIT

Unpacked Size

10.7 kB

Total Files

4

Last publish

Collaborators

  • azuryindustriesnpm