Merhaba python üzerinden discord botu yazıyorum fakat farklı bir olay yaptım tkinter üzerinden bir butona bastıgımız zaman discorda ayarladıgım mesajı göndertiyor fakat bu seferde tkinter hata veriyor hatanın sebebini anlamadım bilen varsa yardımcı olursa sevinirim
KOD;
import discord
import asyncio
from tkinter import *
import tkinter as tk
from threading import Thread
client = discord.Client()
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
channel = client.get_channel(688410519946002558)
await channel.send('Bot is online!')
async def test2():
print("successful!")
channel = client.get_channel(688410519946002558)
await channel.send('Test MSG!')
def test():
loop = asyncio.get_event_loop()
loop.run_until_complete(test2())
loop.close()
def bot_start():
client.run('tokenim')
def gui():
frame = Tk()
b1 = Button(frame, text="Test MSG", command= test).pack()
b2 = Button(frame, text="Bot Start",command=lambda:Thread(target=bot_start).start()).pack()
frame.mainloop()
gui()
HATA;