JacobCoffee / byte

The Discord bot built for developers
https://docs.byte-bot.app/
MIT License
5 stars 2 forks source link

Enhancement: Custom Commands #39

Open JacobCoffee opened 10 months ago

JacobCoffee commented 10 months ago

Summary

38 presents a good first use case for this, because it kind've seems like that wouldn't be useful for all guilds.

Guilds should have the capability to create unique-to-guild custom commands that only apply to them. This would be managed, eventually, by some web UI dashboard.

Basic Example

Guilds can create custom commands in some eventual dashboard

  1. Visit dashboard
  2. "Create custom command"
  3. Add new command to do thing

Drawbacks and Impact

Maybe #38 is useful for all guilds, and having it as a feature will encourage these repositores/libraries to make more awesome-$thing repos.

Unresolved questions

Could we allow creation and management of custom commands via Discord UI. Maybe by allowing (advanced) users to send markdown blocks of their Python code?

  1. User: byte new command
  2. Byte: Reply to me with what it is, ill see if its valid and we can test it
  3. User:
    @command(
        name="ping",
        help="Run `!ping` or `!p` to get a `pong!` response.",
        aliases=["p"],
        brief="Run `!ping` or `!p` to get a `pong!` response.",
        description="Ping the bot.",
    )
    async def ping(self, ctx: Context) -> None:
        """Responds with 'pong'."""
        await ctx.send(f"pong to the {ctx.guild.name} guild!")
  4. Byte: Test/validate -> place it into a class CustomCommands(Cog) that is loaded only for that guild (❓)

Or, for 3, maybe we can just abstract much of this with something like /newcmd name="ping" help="do the roar" aliases="p" action="send('hello world')"


[!NOTE]
We utilize Polar.sh to engage in regular as well as pledge-based > sponsorship.

Check out all issues funded or available for funding on our Polar.sh dashboard

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.

Fund with Polar