iSlammedMyKindle / twitchToDiscordBot

Cross-platform messaging interface between discord and twitch chats
1 stars 2 forks source link

(Migration) TMI.js -> Twurple #11

Closed AceLikesGhosts closed 2 years ago

AceLikesGhosts commented 2 years ago

Starting the migration to Twurple.

AceLikesGhosts commented 2 years ago

There is an issue with this, which at the moment I'm not going to attempt to fix; On our Discord side if we send a message we never actually bind the Twitch message to the linkedListNode, so we are unable to delete it. Other than that this is a completely working migration. Can someone else please look into it? I believe I might have messed up some logic within our twitch.ts for that.

AceLikesGhosts commented 2 years ago

Oop, relooking at my changes and I think I deleted the message chunking by accident o.O

AceLikesGhosts commented 2 years ago

Current idea solution as towards us not receiving our own messages is to create an anonymous client which receives our message event, along with our normal authenticated one to send messages. That way, with our anonymous client we receive all messages and can counter act our authenticated client not receiving the onMessage event when we call ChatClient#say. Will start prototyping and committing most likely tomorrow.

AceLikesGhosts commented 2 years ago

Untested IMPL, although should work; will test when I'm home.

AceLikesGhosts commented 2 years ago

Merging master into this branch messed made both the checks fail, I hate you.

AceLikesGhosts commented 2 years ago

Still untested code, IMPL should work hopefully. (:

iSlammedMyKindle commented 2 years ago

Merging master into this branch messed made both the checks fail, I hate you.

leOof

iSlammedMyKindle commented 2 years ago

There are a lot of changes here! What I'm gonna do is load them onto my local code editor since basically all the core files were changed

iSlammedMyKindle commented 2 years ago

That's interesting... it looks like twurple still requires that we have our own oauth solution, but it does provide a way to login and refresh tokens... either they did that because they are expecting people to have their own solution, or that it was just too hard to make themselves XP

AceLikesGhosts commented 2 years ago

There's a lot of stuff that needs to be changed

I'm about half-way through, but instead of holding comments, I'll let you see what I have so far

Rereview >:( <3

AceLikesGhosts commented 2 years ago

Oh yeah, by the way; tested and it works!

iSlammedMyKindle commented 2 years ago

Gonna give it a launch and perform a blackbox test!

iSlammedMyKindle commented 2 years ago

General tip - In a biz environment, commit descriptions can actually be very useful to determine how did what at a certain time. One of our favorite extensions at our company is something called "git lens", where each line you click on shows when it was last changed, who made it, and the description that it contained

At my work we also use a ticketing system (which I'm not interested in using here), that gives you an exact story/development task ID to lookup elsewhere, so you can then ultimately look at documentation on it's initial progress

So yeah, commit comments are really useful!

AceLikesGhosts commented 2 years ago

no