`guild` and `guilds` make no effect
See original GitHub issueSummary
guild
and guilds
in add_cog
function make no effect on commands in cog
Reproduction Steps
I was trying to understand how this kwargs works and found it.
Minimal Reproducible Code
# cog.py
class Cog(commands.Cog):
@app_commands.command()
async def ping(self, inter):
...
def setup(bot):
bot.add_cog(Cog(), guild=discord.Object(GUILD_ID))
# main.py
bot.load_extension('cog')
Expected Results
bot.tree.get_commands(guild=discord.Object(GUILD_ID)) # [<discord.app_commands.commands.Command ...>]
bot.tree.get_commands() # None
Actual Results
bot.tree.get_commands(guild=discord.Object(GUILD_ID)) # None
bot.tree.get_commands() # [<discord.app_commands.commands.Command ...>]
Intents
default
System Information
- Python v3.10.1-final
- discord.py v2.0.0-alpha
- discord.py pkg_resources: v2.0.0a3843+gd921a039
- aiohttp v3.8.1
- system info: Windows 10 10.0.22000
Checklist
- I have searched the open issues for duplicates.
- I have shown the entire traceback, if possible.
- I have removed my token from display, if visible.
Additional Context
I made a research and came to the conclusion that the root of the issue is here (ext/commands/bot.py#L608) and/or here (ext/commands/cog.py#L503)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Are guilds bad for Games? — Takeaways for Guilds & Devs
There's a notion about guilds being value extractors in blockchain-enabled game economies & how some may be detrimental to the sustainability of these...
Read more >Adventurer Guilds Are Dumb : r/DnD - Reddit
Adventurer Guilds are dumb and make no sense outside of videogames where they're just a gameplay contrivance to efficiently facilitate the ...
Read more >Are Guilds a waste of time? - General Discussion
Unless you plan to do high end raiding (mythic and the last bosses in heroic), yes, they are seemingly useless. You might run...
Read more >Why your Guild is Failing - The Product Hub
Guilds need to focus on outcomes and not simply discussion. They need to measure outcomes by their impact on the guild's mission, their...
Read more >the Adventurers Guild and listen to their report Genshin Impact ...
Go to the Adventurers Guild and listen to their report Genshin Impact Secret Pirate Treasure quest video. This video shows how to complete ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Right now, the
guild
andguilds
keyword arguments only do anything if the cog is also a group. I figured the remaining uses ofguild
andguilds
would be done via the decorators. I guess the fact this issue exists means that the behaviour is surprising, so I suppose I should make it so it applies regardless of whether the cog is a group or not.Yes, but then they will no longer be “free”, so there is no such thing. Feel free to reopen the issue if there is.