#the claim button is not working? i do not receive any errors in my ide
55 messages · Page 1 of 1 (latest)
Damn bro is building the bot I used to run
Check your console for details on the error log
@analog dove
For safety reasons we do not allow files with certain file extensions.
You can share your code using triple backticks like this:
```
YOUR CODE
```
For longer scripts use Hastebin or GitHub Gists and share the link here
- 6miJZ8S.txt
LMAO
whoops sorry i took the ss a little too early
it is running because the !vouch command works
and it sends the embed
but the button is the issue
Yes but Discord just shows you a generic "something went wrong" message
The bot console should tell us some more info
could also be an outdated client, not sure how that behaves with your modified Discord
i tried it on my web browser
So we definitely know it's an issue with the bot
class ClaimVouchView(View):
def __init__(self, user: discord.User, reason: str):
super().__init__()
self.user = user
self.reason = reason
@discord.ui.button(label="Claim", style=discord.ButtonStyle.primary)
async def claim_button(self, interaction: discord.Interaction, button: discord.ui.Button):
if not is_staff(interaction.user):
await interaction.response.send_message("You don't have permission to use this button.", ephemeral=True)
return
# Defer the response to avoid timing issues
await interaction.response.defer()
# Prepare the new view with Approve/Deny buttons
new_view = HandleVouchView(user=self.user, reason=self.reason)
# Edit the message to show that it's being handled by the claiming user
await interaction.message.edit(content=f"This vouch is being handled by {interaction.user.mention}.",
view=new_view)
# Acknowledge the interaction with a follow-up
await interaction.followup.send(f"You have claimed this vouch.", ephemeral=True)```
yup
its so frustrating
That looks ChatGPT for some reason
i did ask chatgpt for help lmao
because i couldnt figure out the issue
and it gave me this shit
ive asked another friend of mine as well and he cant seeem to figure it out
ai is useless
gosh
Yes
I'd probably slap a try except around the entire thing and see if it throws somewhere in there
alrighty let me try
Maybe the Discord bot library has some weird error handling behaviour that we might not be aware of
but the code looks functional doesnt it
Looks correct
Wrong import somewhere?
You don't necessarily need to interact with the button in the action I assume
It should give you some sort of error at least
doesnt work
i tried running it on pycharm as well
im just going to remove the claim button
dude i feel so dumb
i figured it out
god it was so fuc king stupid
LOOOL
What was it