Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"GuildCommandInteraction" is not a known member of module #55

Closed
3 tasks done
LEv145 opened this issue Oct 10, 2021 · 3 comments
Closed
3 tasks done

"GuildCommandInteraction" is not a known member of module #55

LEv145 opened this issue Oct 10, 2021 · 3 comments

Comments

@LEv145
Copy link
Contributor

LEv145 commented Oct 10, 2021

Summary

Code from examples dont work

Reproduction Steps

I inserted the code from the examples into the project

Minimal Reproducible Code

https://github.com/EQUENOS/disnake/blob/master/examples/slash_commands/param.py


# Commands may be limited only to guilds with a special interaction annotation
@bot.slash_command()
async def guild_command(
    inter: disnake.GuildCommandInteraction
) -> None:
    ...

Expected Results

That the code will work

Actual Results

The code doesn't work

Intents

None

System Information

$ pip show disnake
Name: disnake
Version: 2.1.2
Summary: A Python wrapper for the Discord API
Home-page: https://github.com/EQUENOS/disnake
Author: Rapptz, EQUENOS
Author-email:
License: MIT
Location: /home/lev145/PycharmProjects/MusicBot/venv/lib/python3.9/site-packages
Requires: aiohttp
Required-by: discord-disnake

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 love cats

@jgayfer
Copy link
Contributor

jgayfer commented Oct 30, 2021

The ... is a placeholder for the command body. These examples are mostly to provide an example on how to setup slash commands, but I understand where the confusion comes from.

@EQUENOS Do you see any value in making the examples command value such that they will run? Even if it's just a dummy response.

@jgayfer
Copy link
Contributor

jgayfer commented Oct 30, 2021

I take that back, ... is still valid Python. This is likely an installation issue then, and not an issue with the library.

If you add import disnake to your example it should work.

@Victorsitou
Copy link
Member

Victorsitou commented Oct 30, 2021

Do you see any value in making the examples command value such that they will run? Even if it's just a dummy response.

It would be good if we change ... to # Your command here, so people do not get confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants