Coder Social home page Coder Social logo

auto_guild's People

Contributors

mrhemlock avatar shenanigansd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

auto_guild's Issues

Add Category ID Metadata

Currently, categories do not include their IDs in the end result, making it more difficult to use and might require users to manually add them at the end. I'm proposing the following modification to the current format:

categories:
  super_secret:
    - id: number
    - channel: text

In this case, id should be a reserved keyword used specifically for the category IDs.

Arbitrary Constructors and Variables

The YAML library allows you to add arbitrary constructors, and use variables which are parsed at runtime in your config. Here are a few examples:

https://github.com/python-discord/bot/blob/b91820a30af9dcae0c1952432639661889c74970/config-default.yml#L360-L362

https://github.com/python-discord/bot/blob/b91820a30af9dcae0c1952432639661889c74970/config-default.yml#L369-L372

These are currently unsupported by the tool, as it'll error on the unknown constructors, and won't carry variables across. This is problematic as it means end users will have to modify their configs by hand at the end to add the variables back, and config makers can't use any constructors.

I see a few possible options here:

  1. Allow users to define arbitrary constructors/loaders and pass them to the package. There is more information about this in the documentation under Constructors, representers, resolvers.
  2. Ignore unrecognized constructors and just spit them back out at the end. I'm not sure how the implementation for this will work, but it should still allow users to use constructors as they like.

Optional guild configurations field

Currently, the tool assumes the configurations (roles, channels) are at the root level of the yaml. It would be useful if there was an optional field to direct it at a field in the yaml where those configurations are, so that the yaml can have a different structure (e.g if it serves other purposes as well).

Generate config files based on a given guild

Based on an idea I proposed on Discord, it could be quite beneficial to generate those configs (or use the data), by just reading the specifics of a given guild. This could also solve the problem with roles, and server name.

Allow Invalid Channel "Types"

Currently, auto_guild can only understand text and voice as channel types, but if a number was allowed, then existing configs can be used as templates. For instance, the following is what the production config for the pydis bot would look like:

categories:
  information:
    - welcome: text

In the proposed system, text can be a number: welcome: 123456789. Under the proposed system, any unrecognized number would default to text, which in the case of the python bot is just fine.

Alternatively, channels could be converted to objects like categories with a type and id key. This introduces more bloat, but makes it more feasible to use the config and template as one.

Potential bug with role_parser

Role parser starts out assigning the everyone role by default to the payload. My question is if the yaml file contains the everyone role what would happen? would it update the everyone id or duplicate the role?

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.