Giter Site home page Giter Site logo

pycord-multicog's Introduction

Hello there ๐Ÿ‘‹, I'm Dorukyum

  • I am a full-stack developer, proficient in Python
  • I like using React and Svelte for frontend
  • I work on open sourced projects such as pycord

Skills

Python JavaScript TypeScript Java HTML5 CSS3 React Svelte Fast API MongoDB Photoshop

Contact

My Discord Server

Dorukyum's GitHub statistics

pycord-multicog's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

zartio-com

pycord-multicog's Issues

Possible for subgroups aswell?

EG:

admin = discord.SlashCommandGroup("admin", "Utility commands")
admin_faq = admin.create_subgroup("admin_faq", "FAQ admin commands")

# different file

@add_to_group("admin_faq")
# or @add_to_group("admin.admin_faq")

Allow group creation outside of cogs

Currently it seems like a cog must create a group for other cogs to be able to join it. This only works if you have an always loaded (at least in the beginning) cog that spawns the group. This is counterproductive as cogs are meant to by dynamically loaded and unloaded.

Something like this should go around that issue but it does not work.

import discord
from discord.commands import SlashCommandGroup
from pycord.multicog import Bot

bot = Bot()

SlashCommandGroup("owner")
bot.load_extension("cogs.testcog")

bot.run("")
import discord
from discord.ext import commands
from pycord.multicog import add_to_group

class Testcog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @add_to_group("owner")
    @commands.slash_command()
    async def test(self, ctx):
        await ctx.respond("ok")

def setup(bot):
    bot.add_cog(Testcog(bot))
raise RuntimeError(f"no slash command group named {group_name} found.")
RuntimeError: no slash command group named owner found.

Automated tests

Automated tests and a workflow to make sure multicog is applied correctly.

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.