Giter VIP home page Giter VIP logo

Comments (15)

ClaraCrazy avatar ClaraCrazy commented on May 23, 2024

Also.. even on a single server with fully filled out config, the bot doesnt do anything :/

from warnable.

zacwm avatar zacwm commented on May 23, 2024

I believe there may be an issue with your config file. Please post it in here in a code block (Remove the token first before sending!)

from warnable.

ClaraCrazy avatar ClaraCrazy commented on May 23, 2024

will do in about an hour. currently not at home๐Ÿ‘

One question till I am at home tho.. is there a plan for the future that the bot works on every server its in without having to edit the config and everyone that has the "administrator" permission can just use it on each server?

A way to edit the config with a command would be great if you want to make the bot able to be in many servers

from warnable.

ClaraCrazy avatar ClaraCrazy commented on May 23, 2024

The config file:

// Warnable 2.0.0 - Config
module.exports = {
    token: "", // Discord Bot Token - Obtained from the Discord Developer Portal.

    prefix: "c!", // Prefix for commands.

    guilds: { // Guilds must be added in here for the bot to work in.
        "822728900693196800": { 
            point: [ // Actions for if a user reaches above any point values.
                // Range: The range of points for the action to trigger; Points must be lower number then higher number. 
                // Message: "%guild" = The server name / "%points" = Their total points value when the action took place.
                // Leave message blank ("") to disable.
                {
                    range: "5-7",
                    action: "mute-1d",
                    message: "You have been temporarily muted for one day in %guild"
                },
                {
                    range: "8-11",
                    action: "mute-7d",
                    message: "You have been temporarily muted for seven days in %guild"
                },
                {
                    range: "12-14",
                    action: "ban-7d",
                    message: "You have been temporarily banned for seven days in %guild"
                },
                {
                    range: "15-100",
                    action: "ban",
                    message: "You have been permanently banned in %guild for reaching %points"
                }
            ],
			 directmessage: "โš  **You have been warned!** โš \n> You recieved %points point(s) for `%reason`.\n> You now have a total of %total point(s).", // Direct message the user whenever warned. "" to disable. 
            // "\n" = next line. "%points" = points warned, "%total" = their total points, "%reason" = the reason they were warned.
            roles: { // Role ID's for the guild.
                mute: "", // Used for the mute function.
                immune: [826123413327708200], // Auto mod ignores anyone with the role applied.
                moderator: [], // Moderators can only view warnings.
                admin: [826123413327708200] // Admins can apply, remove warnings and adjust guild settings.
            },
            channels: { // Channel ID's to send logs. "" to disable > Note: Logs will still display in the console if disabled.
                important: "", // Actions (mute, kick or ban) on a user from points or manual commands.
                warnings: "", // New warnings that were added to a user.
                messages: "", // Edits or deletions to messages.
                users: "" // Users join or leaving.
            }
			 
			}
		},
	

    msg: { // Bot message settings.
        // Colors used for embeds (https://zachary.fun/i/0vk7L.png)
        colorSuccess: 0x2ecc71,
        colorError: 0xe74c3c
    }
}

I wasnt too sure with where to add the guild but I tried a few different ways. heres the one which didnt give me an error in the console

pls let me know whats wrong and how to add more guilds

from warnable.

ClaraCrazy avatar ClaraCrazy commented on May 23, 2024

After re-downloading the bot and filling in the config once more I came a step further. Now the bot recognizes my commands however now Iยดm getting "You do not have permission to use that command." Even tho I double checked and my RoleID is correctly in the config.

from warnable.

zacwm avatar zacwm commented on May 23, 2024

The config file:

// Warnable 2.0.0 - Config
module.exports = {
    token: "", // Discord Bot Token - Obtained from the Discord Developer Portal.

    prefix: "c!", // Prefix for commands.

    guilds: { // Guilds must be added in here for the bot to work in.
        "822728900693196800": { 
            point: [ // Actions for if a user reaches above any point values.
                // Range: The range of points for the action to trigger; Points must be lower number then higher number. 
                // Message: "%guild" = The server name / "%points" = Their total points value when the action took place.
                // Leave message blank ("") to disable.
                {
                    range: "5-7",
                    action: "mute-1d",
                    message: "You have been temporarily muted for one day in %guild"
                },
                {
                    range: "8-11",
                    action: "mute-7d",
                    message: "You have been temporarily muted for seven days in %guild"
                },
                {
                    range: "12-14",
                    action: "ban-7d",
                    message: "You have been temporarily banned for seven days in %guild"
                },
                {
                    range: "15-100",
                    action: "ban",
                    message: "You have been permanently banned in %guild for reaching %points"
                }
            ],
			 directmessage: "โš  **You have been warned!** โš \n> You recieved %points point(s) for `%reason`.\n> You now have a total of %total point(s).", // Direct message the user whenever warned. "" to disable. 
            // "\n" = next line. "%points" = points warned, "%total" = their total points, "%reason" = the reason they were warned.
            roles: { // Role ID's for the guild.
                mute: "", // Used for the mute function.
                immune: [826123413327708200], // Auto mod ignores anyone with the role applied.
                moderator: [], // Moderators can only view warnings.
                admin: [826123413327708200] // Admins can apply, remove warnings and adjust guild settings.
            },
            channels: { // Channel ID's to send logs. "" to disable > Note: Logs will still display in the console if disabled.
                important: "", // Actions (mute, kick or ban) on a user from points or manual commands.
                warnings: "", // New warnings that were added to a user.
                messages: "", // Edits or deletions to messages.
                users: "" // Users join or leaving.
            }
			 
			}
		},
	

    msg: { // Bot message settings.
        // Colors used for embeds (https://zachary.fun/i/0vk7L.png)
        colorSuccess: 0x2ecc71,
        colorError: 0xe74c3c
    }
}

I wasnt too sure with where to add the guild but I tried a few different ways. heres the one which didnt give me an error in the console

pls let me know whats wrong and how to add more guilds

In this config, you have the "points" property as just "point" so it couldn't read it.

from warnable.

zacwm avatar zacwm commented on May 23, 2024

After re-downloading the bot and filling in the config once more I came a step further. Now the bot recognizes my commands however now Iยดm getting "You do not have permission to use that command." Even tho I double checked and my RoleID is correctly in the config.

From looking at your previous config, you need to have the IDs surrounded in quotation marks (").

Example:

For single roles: ["idhere"]
For multiple roles: ["roleid1", "roleid2"]

Any that don't have the square brackets are just single roles only, make sure they are still surrounded with quotation marks.

from warnable.

ClaraCrazy avatar ClaraCrazy commented on May 23, 2024

Thanks. now it works

How do I add another server to the config tho? and is there maybe a way to do that with a command instead of editing the config?

A way for this would be for the bot to check if you have the "administrator" permission in the server and then allow you to do a command like "warn server add" or something.

Would be really pleased to see this in the near future

Also I just noticed that the time in the warning list isnt right at all. where can I change that?

from warnable.

ClaraCrazy avatar ClaraCrazy commented on May 23, 2024

In general... moving from a role system to just checking if a user has admin or a different permission like manage.messages would make it easier to deploy this bot on multiple servers

from warnable.

zacwm avatar zacwm commented on May 23, 2024

Here is an example of the config for use in multiple servers.
GitHub Gist | Warnable - Double guild example

Regarding the administrator/manage server permissions:
I do try to make it easy to manage all through Discord and commands. However, the intention with this bot is that it should be configured once and then allow others based on the roles set to have access to those set features.

With how it is currently, it will also be difficult for the bot owner to manage who and who shouldn't have access.
For example, inviting bots to Discord servers is really easy, and all they need is the bots Client ID (simple as copying a user's ID within Discord). If the bot owner forgets to untick the "Public Bot" in the Discord Developer Portal, anyone can add it and deploy it on their own server without the bot owner's permission.

TLDR: The Discord permissions can make it difficult for the bot owner to manage what servers should and shouldn't have access to the bot.

But this is a great idea. And can be easily done by just making some new config settings.
It'll just take some time and quite a few changes to make it work.

from warnable.

zacwm avatar zacwm commented on May 23, 2024

Regarding your time issue:
You can configure your time that is used in the options of the db.js file that you are using.
By default, it is set to Australia/Brisbane

from warnable.

ClaraCrazy avatar ClaraCrazy commented on May 23, 2024

Thanks for answering.

I now changed my time in the setup however regarding the other thing; for me it would just be great if everyone with the "administrator" or "manage messages" permission could just juse it on all the servers its on without me having to add the new server all the time. It would be really great if you could somehow do that. If you dont want to put that into the public bot I can understand that and I would also compensate you for the time you waste on my version for the bot then if we can agree on something reasonable.

from warnable.

zacwm avatar zacwm commented on May 23, 2024

Regarding the administrator/manage server permissions:
I do try to make it easy to manage all through Discord and commands. However, the intention with this bot is that it should be configured once and then allow others based on the roles set to have access to those set features.

With how it is currently, it will also be difficult for the bot owner to manage who and who shouldn't have access.
For example, inviting bots to Discord servers is really easy, and all they need is the bots Client ID (simple as copying a user's ID within Discord). If the bot owner forgets to untick the "Public Bot" in the Discord Developer Portal, anyone can add it and deploy it on their own server without the bot owner's permission.

TLDR: The Discord permissions can make it difficult for the bot owner to manage what servers should and shouldn't have access to the bot.

But this is a great idea. And can be easily done by just making some new config settings.
It'll just take some time and quite a few changes to make it work.

from warnable.

zacwm avatar zacwm commented on May 23, 2024

I will get around to adding this in the future! :)

from warnable.

ClaraCrazy avatar ClaraCrazy commented on May 23, 2024

Hey. just wanted to check up on that. Anything new so far?

from warnable.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.