You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can use the twitch api directly, but not in Pyqt5. What should I do? I couldn't find the answer for hours. What should I do, where should I write? I can't run it in the interface. It works without interface. It does nothing with the interface. How can I run it? Thank you.
This is how it's work:
`import asyncio
import pytmi
listToken = ["Token List"]
listNick = ["User List"]
channel = "**************************"
messagesList = ["Hello","Hi","Goodnight"]
for i in range(0,3):
async def main() -> None:
# nick = input("Insert your Twitch nickname: ").lstrip()
# token = input("Insert your Twitch OAuth token: ").lstrip()
# channel = input("Insert the channel to join: ").lstrip()
client = pytmi.TmiClient()
await client.login_oauth(listToken[i], listNick[i])
await client.join(channel)
await client.send_privmsg(messagesList[i])
await client.part(channel)
await client.logout()
if __name__ == "__main__":
try:
loop = asyncio.new_event_loop()
loop.run_until_complete(main())
except:
print("Something went wrong.")`
Not running:
`def YorumAttirCalistir(self):
os.chdir("Data")
os.chdir("Kullanıcılar")
listToken = []
listNick = []
dosyaOuath = open("Oauth.txt", "r", encoding="UTF8")
for i in dosyaOuath:
i = i[:-1]
listToken.append(i)
newListToken = listToken
dosyaNick = open("Oauth.txt", "r", encoding="UTF8")
for i in dosyaNick:
i = i[:-1]
listNick.append(i)
newListNick = listNick
os.chdir("..")
os.chdir("..")
os.chdir("Data")
os.chdir("Chat")
os.chdir("Valorant Chat")
messagesList = []
dosyaComment = open("Valorant.txt", "r", encoding="UTF8")
for i in dosyaComment:
i = i[:-1]
messagesList.append(i)
newListMessages = messagesList
channel = "shawncutstheh"
token = newListToken
nick = newListNick
yorum = newListMessages
def YorumAttir():
for i in range(0,4):
async def main() -> None:
# nick = input("Insert your Twitch nickname: ").lstrip()
# token = input("Insert your Twitch OAuth token: ").lstrip()
# channel = input("Insert the channel to join: ").lstrip()
client = pytmi.TmiClients()
await client.login_oauth(token[i], nick[i])
await client.join(channel)
await client.send_privmsg(yorum[i])
await client.part(channel)
await client.logout()
if __name__ == "__main__":
try:
loop = QEventLoop.new_event_loop()
loop.run_until_complete(main())
except:
print("Something went wrong.")
YorumAttirThread = threading.Thread(
target=YorumAttir)
YorumAttirThread.start()`
The text was updated successfully, but these errors were encountered:
I can use the twitch api directly, but not in Pyqt5. What should I do? I couldn't find the answer for hours. What should I do, where should I write? I can't run it in the interface. It works without interface. It does nothing with the interface. How can I run it? Thank you.
This is how it's work:
`import asyncio
import pytmi
listToken = ["Token List"]
listNick = ["User List"]
channel = "**************************"
messagesList = ["Hello","Hi","Goodnight"]
for i in range(0,3):
Not running:
`def YorumAttirCalistir(self):
The text was updated successfully, but these errors were encountered: