utarwyn / discord-tictactoe

Highly customizable innovative Discord Bot for playing Tic-Tac-Toe 🎮🏅

Home Page:https://npmjs.com/package/discord-tictactoe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use of Prefix

Skylaza opened this issue · comments

I mean that instead of using slash command there should be a option for using the command just by the bot's prefix that would be really helpful for those which use prefix to run their commands you already have made this please send me the docs file of that

Hello, yes you can switch from slash command to text command if you want.
In order to do that, you have to set the config value "command" to an empty string and config value "textCommand" with prefix that you want.

Here is an example of what you can do (in the wiki): https://github.com/utarwyn/discord-tictactoe/wiki/Usage-examples-with-Node.js#use-text-command-instead-of-slash-command-discordjs-v13

You can also find few explanations in config interfaces:

export default interface CommandConfig {
/**
* Slash command used to start a new game.
*/
command?: string;
/**
* Name of command option to request a duel against another user.
*/
commandOptionName?: string;
/**
* Text command used to start a new game.
*/
textCommand?: string;
}