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

Slash Commands with ViewMenu showing error on Discord Client #47

Closed
3 tasks done
Dynamixus opened this issue Jul 2, 2023 · 1 comment
Closed
3 tasks done

Slash Commands with ViewMenu showing error on Discord Client #47

Dynamixus opened this issue Jul 2, 2023 · 1 comment
Labels
bug Something isn't working fixed The bug has been fixed and an update has been pushed to Github

Comments

@Dynamixus
Copy link

Describe the bug

Whenever I run a ViewMenu command as a Slash Command, the bot sends an Ephemeral Message saying
The application did not respond
I'm following the basic format. The command is a hybrid_command, and while the Slash Command raises an Error, the prefix command works without any issue.

Minimal Reproducible Code

from reactionmenu import ViewMenu, ViewSelect, Page, ViewButton
from datetime import datetime, timedelta
import discord
from discord import app_commands
from discord.ext import commands
from discord.ext.commands import Context

class General(commands.Cog, name="general"):
	def __init__(self, bot):
		self.bot = bot

        @commands.hybrid_command(name = "uwu", description = "...")
	@checks.not_blacklisted()
	async def uwu(self, context: Context) -> None:

		menu = ViewMenu(context, menu_type = ViewMenu.TypeEmbed, disable_items_on_timeout = False, remove_items_on_timeout = True, timeout = 600.0)

		page1 = discord.Embed(
			title="uwu1",
			description="...",
			color=0x752C18,
			timestamp=datetime.now(),
			)

		page2 = discord.Embed(
			title="uwu2",
			description="...",
			color=0x752C18,
			timestamp=datetime.now(),
			)

		menu.add_page(page1)
		menu.add_page(page2)

		menu.add_button(ViewButton(style=discord.ButtonStyle.primary, emoji='👑', label='x', custom_id = ViewButton.ID_GO_TO_FIRST_PAGE))
		menu.add_button(ViewButton(style=discord.ButtonStyle.primary, emoji='💎', label='y', custom_id = ViewButton.ID_GO_TO_LAST_PAGE))
		menu.add_button(ViewButton(style=discord.ButtonStyle.danger, label = "Close", custom_id = ViewButton.ID_END_SESSION))

		await menu.start()

Traceback

None

Library Version

  • Python v3.10.0-final
  • discord.py v2.3.1-final
  • aiohttp v3.8.4
  • system info: Windows 10 10.0.19044

Required Checklist

  • I am using discord.py 2.0 or higher
  • I am using reactionmenu 3.1.0 or higher
  • I have the required intents enabled

Additional Comments

No response

@Dynamixus Dynamixus added the unconfirmed bug The bug cannot be replicated when the minimal code provided was tested label Jul 2, 2023
Defxult added a commit that referenced this issue Jul 3, 2023
@Defxult Defxult added bug Something isn't working fixed The bug has been fixed and an update has been pushed to Github and removed unconfirmed bug The bug cannot be replicated when the minimal code provided was tested labels Jul 3, 2023
@Defxult
Copy link
Owner

Defxult commented Jul 3, 2023

This has been fixed as of v3.1.4. It has not been released to PyPI. It's planned to officially release in a few weeks, maybe the end of the month. In the mean time, you can install the development version of v3.1.4 by checking out the how to install section of the readme.

Thank you for reporting the issue! 😎

@Defxult Defxult closed this as completed Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed The bug has been fixed and an update has been pushed to Github
Projects
None yet
Development

No branches or pull requests

2 participants