Mahir Çınar Girgin
Decapat
Daha fazla
- Cinsiyet
- Erkek
- Meslek
- Öğrenci
Discord sunucum için bir bot yapıyorum fakat butonlar çalışmıyor. Birçok kaynaktan denedim fakat çalışmadı. Kodlarım ise şunlar;
Çıktı ise şu şekilde;
Aldığım hata ise;
await interaction.response.send_message("Hello you clicked me")
AttributeError: 'Button' object has no attribute 'response'
Hata yaptığım yeri bulmakta sıkıntı çekiyorum.
İmport'larım ise bunlar;
Python:
class Menu(discord.ui.View):
def __init__(self):
super().__init__()
self.value = None
@discord.ui.button(label="Send Message", style=discord.ButtonStyle.grey)
async def menu1(self, button: discord.ui.Button, interaction: discord.Interaction):
await interaction.response.send_message("Hello you clicked me")
@Bot.command()
async def embed_with_buttons(ctx):
view = Menu()
embed = discord.Embed(colour=0xFF5733, title="Title", type="rich", url=None, description="description", timestamp=None)
await ctx.send(embed=embed, view=view)
Çıktı ise şu şekilde;
Aldığım hata ise;
await interaction.response.send_message("Hello you clicked me")
AttributeError: 'Button' object has no attribute 'response'
Hata yaptığım yeri bulmakta sıkıntı çekiyorum.
İmport'larım ise bunlar;
Python:
import discord
from discord.ext import commands
import time
from discord.ui import Button
from interactions import Button, ButtonStyle, SelectMenu, SelectOption
import interactions