Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

discord.js-akinator

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord.js-akinator

A Discord.js v13 Module that allows you to Create an Akinator Command for Your Discord Bot within Seconds of Installation.

  • 3.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
419
increased by203.62%
Maintainers
1
Weekly downloads
 
Created
Source

🔮 Discord.js Akinator 🔮

A Discord.js v13 Module that allows you to Create an Akinator Command for Your Discord Bot within Seconds of Installation.

UPDATE 3.0.0 - Lots of New Changes! (and some breaking, so be careful!)

New Features Include:

FULL TRANSLATION (100+ New Languages!)

Discord.js Akinator no longer relies on other Akinator API servers to translate, as they are all slow and laggy apart from the European one. Also, they would only translate the questions and nothing else!

By utilising Google Translate and creating hard-coded translation mappings, OVER 100 NEW LANGUAGES are now supported! Also, every piece of text is now translatable, not just the questions!

BUTTONS!

With this new option, you can choose to use the new discord buttons!

Do keep in mind that it is false by default.

CHILD MODE!

Want to filter out NSFW questions? Simply set this option to true!

Again, this will default to false.

NO CLIENT PARAMETER NEEDED!

The package no longer requires you to pass in a Discord.Client object to function.

Just pass in the Discord.Message and it'll handle the rest!

Install Package

Let's take a look at how you can install this package into your Discord Bot Project.

npm i discord.js-akinator --save

For versions 3.0.0 and Above, you'll also need discord.js v13. This can easily be installed with:

npm i discord.js@13 --save

For versions earlier than 3.0.0, you'll need discord.js v12. However it is recommended you update to patch bugs and security vulnerabilities, as well as getting the newest features from this package!

npm i discord.js@12 --save

Example Code

const { Client, Intents } = require("discord.js");
const akinator = require("discord.js-akinator");
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });

client.on("ready", () => {
    console.log("Bot is Online")
});

const PREFIX = "!";

//Example options

const language = "en"; //The Language of the Game
const childMode = false; //Whether to use Akinator's Child Mode
const useButtons = true; //Whether to use Discord's Buttons

client.on("messageCreate", async message => {
    if(message.content.startsWith(`${PREFIX}akinator`)) {
        akinator(message, {
            language: language, //Defaults to "en"
            childMode: childMode, //Defaults to "false"
            useButtons: useButtons //Defaults to "false"
        });
    }
});

client.login("Discord Bot Token")

Contributors

  • ChaosArising (Josh_#9733) (Providing compatibility for Discord.js v13)

  • 3061LRTAGSPKJMORMRT (Ashish#0540) (Error handling and writing much cleaner code)

Need Help or Find Any Bugs? Join Our Discord Server!

https://discord.gg/P2g24jp

Keywords

FAQs

Package last updated on 18 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc