Как совместить Визуальное окно с отправкой сообщений в Discord, с помощью бота?
from PyQt5 import QtWidgets, uic
import pyautogui as pg
import time
import discord
from discord.ext import commands
from discord.ext import tasks
from discord import Embed
PREFIX = "m-"
Client = commands.Bot(command_prefix = PREFIX)
app = QtWidgets.QApplication([])
ui = uic.loadUi("main.ui")
ui.setWindowTitle("Serial Command GUI")
@Client.event
async def on_ready():
print("Load")
ui.ButEnter.clicked.connect(gg)
ui.show()
app.exec()
async def gg():
data = int(ui.ID.text())
channel = await Client.fetch_channel(data)
await channel.send(embed = discord.Embed(description=f"Hello World"))
Client.run("Token", bot = True)