RS2Widget widgey = widgets.getWidgetContainingText("wishes to trade with you"); //this is what you're looking for, BUT \/
That will get you any trade offer thats made though, regardless of where it is within the chatbox. You'll want to, instead, keep track of when the trade request appeared (by getting when the text occurred inside of the chatbox, probably using onMessage) and if it's within a certain timeframe, accept the trade offer