zerinho6bot-zz / Zerinho6-Bot

Pretty fast and lite Discord bot made in JavaScript using Discord.js
MIT License
5 stars 2 forks source link

New commandNeeds options #9

Closed zerinho6 closed 5 years ago

zerinho6 commented 5 years ago

The new options'll be: SpecificAuthor, SpecificGuild, SpecificChannel and not confirmed SpecificRole.

Not-Confirmed Documentation

Option Name SpecificAuthor SpecificGuild SpecificChannel SpecificRole
Value must be String or Array[String] String or Array[String] String or Array[String] String or Array[String]
Default Value false false false false
Expected String(en_us) "Only (a user / Users) with (this / those) ID can use that command: ( / )" "That command can only be used in (a Guild / in Guilds) with (the follow ID / those IDs): ( / )" "That command can only be used in (a Channel / in Channels) with (the follow ID / those IDs): ( / )" "That command can only by users with (the follow role ID/ those roles IDs): ()
zerinho6 commented 5 years ago

System is done, here's the status:

Confirmed Documentation

Options Name specificAuthor specificGuild specificChannel specificRole
Value must be String"ID" or Array[String"ID"] String"ID" or Array[String"ID"] String"ID" or Array[String"ID"] String"ID" or String"RoleName"
Default value false false false false false

Here's the returned Strings(en_us):

            "specificNeeds": {
                "specificAuthor": {
                    "pluralReturn": "Only users with those IDs can use that command:",
                    "defaultReturn": "Only a user with the follow id can use that command:"
                },
                "specificGuild": {
                    "pluralReturn": "You can execute this command only in one of Guilds of those IDs:",
                    "defaultReturn": "You can execute this command only on the Guild with the follow ID:"
                },
                "specificChannel": {
                    "pluralReturn": "You can only execute this command on channels with those IDs:",
                    "defaultReturn": "You can only execute this command in a channel with the follow ID:"
                },
                "specificRole": {
                    "defaultReturn": "Only a member with a role with the follow ID can use this command:",
                    "nameReturn": "You need a role with the follow name to use that command:"
                }
            }

Example of usage:

local_storage/command_needs.json

{
    "help": {
        "options": {
            "specificRole": "564476489979002931",
            "specificAuthor": "134292889177030657",
            "specificRole": "zero",
            "specificChannel": "490329576300609538",
            "specificGuild": "490329576300609536"
        }
    }
}

System will be launched and closes as soon as #10 gets confirmed.

zerinho6 commented 5 years ago

~Actually, the default value is undefined~