Skip to content

Commit

Permalink
Change default for useButtons option to true
Browse files Browse the repository at this point in the history
  • Loading branch information
WillTDA committed Jun 17, 2023
1 parent e2877e8 commit 34f34d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ client.on("ready", () => {
const language = "en"; //The language of the game. Defaults to "en".
const childMode = false; //Whether to use Akinator's Child Mode. Defaults to "false".
const gameType = "character"; //The type of Akinator game to be played. ("animal", "character" or "object"). Defaults to "character".
const useButtons = true; //Whether to use Discord's buttons instead of message input for answering questions. Defaults to "false".
const useButtons = true; //Whether to use Discord's buttons instead of message input for answering questions. Defaults to "true".
const embedColor = "#1F1E33"; //The color of the message embeds. Defaults to "Random".
const translationCachingOptions = {
enabled: true, //Whether to cache translations. Defaults to "true". (Recommended)
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function getButtonReply(interaction) {
* @prop {string} [options.language="en"] The language of the game. Defaults to `en`.
* @prop {boolean} [options.childMode=false] Whether to use Akinator's Child Mode. Defaults to `false`.
* @prop {"character" | "animal" | "object"} [options.gameType="character"] The type of Akinator game to be played. Defaults to `character`.
* @prop {boolean} [options.useButtons=false] Whether to use Discord's buttons instead of message input for answering questions. Defaults to `false`.
* @prop {boolean} [options.useButtons=true] Whether to use Discord's buttons instead of message input for answering questions. Defaults to `true`.
* @prop {Discord.ColorResolvable} [options.embedColor="Random"] The color of the message embeds. Defaults to `Random`.
* @prop {object} [translationCaching={}] The options for translation caching.
* @prop {boolean} [translationCaching.enabled=true] Whether to cache successful translations in a JSON file to reduce API calls and boost performance. Defaults to `true`.
Expand Down Expand Up @@ -56,7 +56,7 @@ module.exports = async function (input, options) {
options.language = options.language || "en";
options.childMode = options.childMode !== undefined ? options.childMode : false;
options.gameType = options.gameType || "character";
options.useButtons = options.useButtons !== undefined ? options.useButtons : false;
options.useButtons = options.useButtons !== undefined ? options.useButtons : true;
options.embedColor = Discord.resolveColor(options.embedColor || "Random");

//configuring translation caching options if not specified
Expand Down
2 changes: 1 addition & 1 deletion src/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const translate = require("./translate");

/**
* @param {boolean} useButtons If true, use buttons. If false, use text input.
* @param {Discord.Message | Discord.CommandInteraction} input The Message or Slash Command Sent by the user.
* @param {Discord.Message | Discord.CommandInteraction} input The Message or Slash Command sent by the user.
* @param {Discord.Message} botMessage The message for the bot to send, also the message which will contain the buttons (Max. 8). MUST BE AN EMBED!
* @param {boolean} isGuessFilter Specifies whether to only show buttons used when Akinator is guessing.
* @param {any} translations Active translation file.
Expand Down

0 comments on commit 34f34d3

Please sign in to comment.